comparison vim/vimrc @ 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 eb8891b1a6f5
children 265442d4def8
comparison
equal deleted inserted replaced
468:979513155f17 469:07ee0d517d92
197 endif 197 endif
198 endif 198 endif
199 199
200 " Syntax highlighting. 200 " Syntax highlighting.
201 syntax on 201 syntax on
202
203 " Change the current directory to the home directory.
204 if !exists('g:resourcing_vimrc')
205 cd ~/
206 endif
207 202
208 " Default color scheme. 203 " Default color scheme.
209 if has('gui_running') 204 if has('gui_running')
210 set background=dark 205 set background=dark
211 else 206 else
315 " }}} 310 " }}}
316 311
317 " Gutentags {{{ 312 " Gutentags {{{
318 313
319 let g:gutentags_cache_dir = ludo#localpath('tags') 314 let g:gutentags_cache_dir = ludo#localpath('tags')
320 let g:gutentags_ctags_exclude = ['venv', 'build', 'static', 'node_modules']
321 let g:gutentags_ctags_extra_args = ['--options='.ludo#localpath('ctagsrc')] 315 let g:gutentags_ctags_extra_args = ['--options='.ludo#localpath('ctagsrc')]
322 let g:gutentags_ctags_exclude_wildignore = 0 316 let g:gutentags_ctags_exclude_wildignore = 0
323 317
324 augroup GutentagsStatusLineRefresher 318 augroup GutentagsStatusLineRefresher
325 autocmd! 319 autocmd!
727 autocmd FileType cs nnoremap <Leader>dc :OmniSharpDocumentation<cr> 721 autocmd FileType cs nnoremap <Leader>dc :OmniSharpDocumentation<cr>
728 augroup END 722 augroup END
729 endif 723 endif
730 724
731 " ProjectRoot mappings 725 " ProjectRoot mappings
726 let g:ludo_enable_autoprojectroot = 0
727
732 let s:no_auto_projectroot_buftypes = [ 728 let s:no_auto_projectroot_buftypes = [
733 \'help', 'nofile', 'quickfix'] 729 \'help', 'nofile', 'quickfix']
734 730
735 function! s:AutoProjectRootCD() abort 731 function! s:AutoProjectRootCD() abort
736 try 732 if g:ludo_enable_autoprojectroot
737 if index(s:no_auto_projectroot_buftypes, &buftype) == -1 733 try
738 ProjectRootCD 734 if index(s:no_auto_projectroot_buftypes, &buftype) == -1
739 endif 735 ProjectRootCD
740 catch 736 endif
741 " Silently ignore invalid buffers 737 catch
742 endtry 738 " Silently ignore invalid buffers
739 endtry
740 endif
743 endfunction 741 endfunction
744 742
745 augroup VimRC_ProjectRoot 743 augroup VimRC_ProjectRoot
746 autocmd! 744 autocmd!
747 autocmd BufEnter * call <SID>AutoProjectRootCD() 745 autocmd BufEnter * call <SID>AutoProjectRootCD()