From 298897dcd183ef0b05ff4be7ac221bd219f36291 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Fri, 24 Dec 2021 14:00:54 +0100 Subject: [PATCH] plugins: Move init confs to plugin confs --- init.vim | 10 ---------- plugins.vim | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/init.vim b/init.vim index 414b3ff..51804e5 100644 --- a/init.vim +++ b/init.vim @@ -73,16 +73,6 @@ au Filetype mail syn match Statement /^\s*-*\s*8<\s*-*\s*$/ " Line wrap crippled with numbers shown au Filetype man setlocal nonumber -" Minimum indenting for source code -au FileType java,cpp,c,cs let g:detectindent_min_indent = 4 -" Consider using localvimrc config file or editorconfig instead -"au BufReadPost *.java :DetectIndent - -au BufEnter *.c* let b:fswitchlocs='reg:/lib/include/,rel:.' -au BufEnter *.h* let b:fswitchlocs='reg:/include/lib/,rel:.' - -au BufEnter *.cpp,*.cc,*.cxx let b:fswitchdst='h,hxx,hpp,hh' -au BufEnter *.h,*.hh,*.hxx let b:fswitchdst='cc,c,cxx,cpp' au BufNewFile *.{h,hpp,hxx} call AddIncludeGuards() au FileType cpp,c packadd termdebug diff --git a/plugins.vim b/plugins.vim index 1c88f15..538322a 100644 --- a/plugins.vim +++ b/plugins.vim @@ -39,6 +39,11 @@ function PluginsConfig() let g:detectindent_max_indent = 4 let g:detectindent_preferred_indent = 4 + " Minimum indenting for source code + au FileType c,cpp,objc,java,cs let g:detectindent_min_indent = 4 + " Consider using localvimrc config file or editorconfig instead + "au BufReadPost *.java :DetectIndent + let g:airline_powerline_fonts=1 let g:airline#extensions#tabline#enabled=1 let g:airline#extensions#branch#enabled=1 @@ -90,5 +95,10 @@ function PluginsConfig() \ '', \ ] endif + + au BufEnter *.c* let b:fswitchlocs='reg:/lib/include/,rel:.' + au BufEnter *.h* let b:fswitchlocs='reg:/include/lib/,rel:.' + au BufEnter *.cpp,*.cc,*.cxx let b:fswitchdst='h,hxx,hpp,hh' + au BufEnter *.h,*.hh,*.hxx let b:fswitchdst='cc,c,cxx,cpp' endfunction -- 2.30.2