From: Samir Benmendil Date: Thu, 20 Apr 2017 23:41:28 +0000 (+0100) Subject: vim: add ftplugin/c with fswitch and ycm goto bindings X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/9f8043f254153951ad032048d14d576813d85ee4?ds=inline vim: add ftplugin/c with fswitch and ycm goto bindings --- diff --git a/vim/ftplugin/c.vim b/vim/ftplugin/c.vim new file mode 100644 index 0000000..16a9bf6 --- /dev/null +++ b/vim/ftplugin/c.vim @@ -0,0 +1,12 @@ +" Load the doxygen syntax +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/**|' +augroup END + +nnoremap gd :YcmCompleter GoTo +nnoremap d :vs:YcmCompleter GoTo