plugins: Move init confs to plugin confs
authorStefan Huber <shuber@sthu.org>
Fri, 24 Dec 2021 13:00:54 +0000 (14:00 +0100)
committerStefan Huber <shuber@sthu.org>
Fri, 24 Dec 2021 13:00:54 +0000 (14:00 +0100)
init.vim
plugins.vim

index 414b3ffcfbc5eed4e64de1c329463b86434696c2..51804e5c15cda8ce1bea45cad6ff34c711ab7000 100644 (file)
--- 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
index 1c88f15d6fde40003cd6c286ad3a2a202d93f2c9..538322ad82f1908bf79b9d1db099eddc961a3a95 100644 (file)
@@ -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