From 9f8043f254153951ad032048d14d576813d85ee4 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 21 Apr 2017 00:41:28 +0100 Subject: [PATCH] vim: add ftplugin/c with fswitch and ycm goto bindings --- vim/ftplugin/c.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 vim/ftplugin/c.vim 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 -- 2.48.1