]> git.rmz.io Git - dotfiles.git/blobdiff - vim/ftplugin/c.vim
mutt: fix F macro to not write message to home
[dotfiles.git] / vim / ftplugin / c.vim
index 16a9bf6c349cdec189a1c444ee81c0dc1c8b4ded..4131fa2e04417de2315be9cf59d1636aa0a41004 100644 (file)
@@ -2,11 +2,17 @@
 let b:load_doxygen_syntax = 1
 
 augroup fswitch
-    au BufEnter *.h let b:fswitchdst  = 'c'
-    au BufEnter *.h let b:fswitchlocs = 'reg:|include.*|source|'
-    au BufEnter *.c let b:fswitchdst  = 'h'
-    au BufEnter *.c let b:fswitchlocs = 'reg:|source|include/**|'
+    au!
+    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/**|'
 augroup END
 
 nnoremap <buffer> gd :YcmCompleter GoTo<CR>
 nnoremap <buffer> <C-W>d :vs<CR>:YcmCompleter GoTo<CR>
+nnoremap <buffer> gD :YcmCompleter GoToReferences<CR>
+
+let b:tcomment_options = {'whitespace': 'no'}
+
+setlocal cinoptions+=l1  " align with case label