]> git.rmz.io Git - dotfiles.git/commitdiff
vim: suppor fswitching to/from cxx files
authorSamir Benmendil <samir.benmendil@ultrahaptics.com>
Fri, 26 Oct 2018 16:07:54 +0000 (17:07 +0100)
committerSamir Benmendil <samir.benmendil@ultrahaptics.com>
Fri, 26 Oct 2018 16:07:54 +0000 (17:07 +0100)
vim/ftplugin/c.vim

index a4625ac29a1cb2e989c65594a327dc1c010620c1..a003e8ff43097d11b4c9db97918b343e780be0d4 100644 (file)
@@ -3,14 +3,14 @@ let b:load_doxygen_syntax = 1
 
 augroup fswitch
     au!
-    au BufEnter *.h   let b:fswitchdst  = 'c,cpp'
-    au BufEnter *.h   let b:fswitchlocs = '.,reg:|include.*|src|'
-    au BufEnter *.c let b:fswitchdst  = 'h'
-    au BufEnter *.c let b:fswitchlocs = 'reg:|source|include/**|'
-    au BufEnter *.hpp let b:fswitchdst  = 'cpp,c'
-    au BufEnter *.hpp let b:fswitchlocs = 'reg:|include.*|src|'
-    au BufEnter *.cpp let b:fswitchdst  = 'hpp,h'
-    au BufEnter *.cpp let b:fswitchlocs = 'reg:|src|include/**|'
+    au BufEnter *.h        let b:fswitchdst  = 'c,cpp,cxx'
+    au BufEnter *.h        let b:fswitchlocs = '.,reg:|include.*|src|'
+    au BufEnter *.c        let b:fswitchdst  = 'h'
+    au BufEnter *.c        let b:fswitchlocs = 'reg:|source|include/**|'
+    au BufEnter *.hpp      let b:fswitchdst  = 'cpp,cxx,c'
+    au BufEnter *.hpp      let b:fswitchlocs = 'reg:|include.*|src|'
+    au BufEnter *.c(pp|xx) let b:fswitchdst  = 'hpp,h'
+    au BufEnter *.c(pp|xx) let b:fswitchlocs = 'reg:|src|include/**|'
 augroup END
 
 nnoremap <buffer> gd :YcmCompleter GoTo<CR>