]> git.rmz.io Git - dotfiles.git/blobdiff - vim/ftplugin/cpp.vim
vim/cpp: fix fswitch for cadscan
[dotfiles.git] / vim / ftplugin / cpp.vim
index b98aee201b55bd53a2f4c19841c3539e782f7cd0..7dd40e60d9239aa5f98ec1e98a78c22e39cda2df 100644 (file)
@@ -15,8 +15,10 @@ setlocal cinoptions+=:0  " don't indent case labels
 let b:load_doxygen_syntax = 1
 
 augroup fswitch
-    au BufEnter *.h let b:fswitchdst  = 'cpp,c'
-    au BufEnter *.h let b:fswitchlocs = 'reg:/include/source/'
+    au BufEnter *.h   let b:fswitchdst  = 'cpp,c'
+    au BufEnter *.h   let b:fswitchlocs = 'reg:/include/source/'
+    au BufEnter *.cpp let b:fswitchdst  = 'h'
+    au BufEnter *.cpp let b:fswitchlocs = 'reg:/\Csource/include/'
 augroup END
 
 setlocal foldmethod=syntax