diff vim/vimrc @ 381:af7646eceddc

Add projectroot plugin for Vim.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 03 Apr 2017 13:07:50 -0700
parents 58410650ce36
children b570ad9917c0
line wrap: on
line diff
--- a/vim/vimrc	Sat Feb 25 21:31:56 2017 -0800
+++ b/vim/vimrc	Mon Apr 03 13:07:50 2017 -0700
@@ -670,6 +670,13 @@
     normal zz
 endfunction
 
+function! s:AutoProjectRootCD() abort
+  if &buftype == ''
+    ProjectRootCD
+  endif
+endfunction
+autocmd BufEnter * call <SID>AutoProjectRootCD()
+
 " }}}
 
 " Local override {{{