changeset 469:07ee0d517d92

Don't auto `cd` into a project by default anymore.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 09 Apr 2019 18:55:39 -0700
parents 979513155f17
children 3b9394a0a58b
files vim/vimrc
diffstat 1 files changed, 11 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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