From 53378083fa7d39a68701dea56c3447db48740db5 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 20 May 2017 22:40:32 -0500 Subject: [PATCH] Update vim stuff --- apps/neovim/init.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/neovim/init.vim b/apps/neovim/init.vim index efc80a6..78003fd 100644 --- a/apps/neovim/init.vim +++ b/apps/neovim/init.vim @@ -214,13 +214,18 @@ endif fun! RunMake() split if has('nvim') - execute 'terminal make ' . g:make_args - :autocmd TermClose * call feedkeys('') + " run from the root of the current git repository + let path = system("git rev-parse --show-toplevel | tr -d '\\n'") + " TODO: handle non-git situations + execute 'terminal cd ' . path . ' && make ' . g:make_args else execute '!make ' . g:make_args endif endfun +" kill the terminal buffer when the process exits +" autocmd TermClose * call feedkeys('') + " whitespace " use tabs at a two-space width set tabstop=2