# HG changeset patch # User Ludovic Chabant # Date 1554861339 25200 # Node ID 07ee0d517d92d4e66ff6084e95dea4fb9349cb4b # Parent 979513155f17c1888b78480319257ba7068b49c3 Don't auto `cd` into a project by default anymore. diff -r 979513155f17 -r 07ee0d517d92 vim/vimrc --- a/vim/vimrc Tue Apr 09 18:54:30 2019 -0700 +++ b/vim/vimrc Tue Apr 09 18:55:39 2019 -0700 @@ -200,11 +200,6 @@ " Syntax highlighting. syntax on -" Change the current directory to the home directory. -if !exists('g:resourcing_vimrc') - cd ~/ -endif - " Default color scheme. if has('gui_running') set background=dark @@ -317,7 +312,6 @@ " Gutentags {{{ let g:gutentags_cache_dir = ludo#localpath('tags') -let g:gutentags_ctags_exclude = ['venv', 'build', 'static', 'node_modules'] let g:gutentags_ctags_extra_args = ['--options='.ludo#localpath('ctagsrc')] let g:gutentags_ctags_exclude_wildignore = 0 @@ -729,17 +723,21 @@ endif " ProjectRoot mappings +let g:ludo_enable_autoprojectroot = 0 + let s:no_auto_projectroot_buftypes = [ \'help', 'nofile', 'quickfix'] function! s:AutoProjectRootCD() abort - try - if index(s:no_auto_projectroot_buftypes, &buftype) == -1 - ProjectRootCD - endif - catch - " Silently ignore invalid buffers - endtry + if g:ludo_enable_autoprojectroot + try + if index(s:no_auto_projectroot_buftypes, &buftype) == -1 + ProjectRootCD + endif + catch + " Silently ignore invalid buffers + endtry + endif endfunction augroup VimRC_ProjectRoot