]> git.rmz.io Git - dotfiles.git/blob - vim/ftplugin/c.vim
vim/man: set some defaults for man files similar to :help
[dotfiles.git] / vim / ftplugin / c.vim
1 " Load the doxygen syntax
2 let b:load_doxygen_syntax = 1
3
4 augroup fswitch
5 au!
6 au BufEnter *.h let b:fswitchdst = 'c,cpp,cxx'
7 au BufEnter *.h let b:fswitchlocs = '.,reg:|include.*|src|'
8 au BufEnter *.c let b:fswitchdst = 'h'
9 au BufEnter *.c let b:fswitchlocs = 'reg:|source|include/**|'
10 augroup END
11
12 " Disable ale as we use ycm
13 let b:ale_enabled = 0
14
15 nnoremap <buffer> gd :YcmCompleter GoTo<CR>
16 nnoremap <buffer> <C-W>d :vs<CR>:YcmCompleter GoTo<CR>
17 nnoremap <buffer> gD :YcmCompleter GoToReferences<CR>
18
19 let b:tcomment_options = {'whitespace': 'no'}
20
21 setlocal cinoptions+=l1 " align with case label