X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/a908a41cb42d95faed862049b43ee1bd546abe91..c6a94b49c00ea320c67909cbe0d2df2f95d4fbb9:/vim/ftplugin/cpp.vim diff --git a/vim/ftplugin/cpp.vim b/vim/ftplugin/cpp.vim index 2f545a5..a3846a8 100644 --- a/vim/ftplugin/cpp.vim +++ b/vim/ftplugin/cpp.vim @@ -6,6 +6,8 @@ setlocal tabstop=4 setlocal softtabstop=4 setlocal expandtab +"TODO these are ignored because we set indentexpr in `indent/cpp.vim` +" Ideally, indentexpr should read the settings from .clang-format if it exists setlocal nosmartindent setlocal autoindent setlocal cinkeys-=0# " don't reindent PP directives @@ -41,14 +43,16 @@ let g:switch_const_definitions = \ 'const \([[:alnum:]_:<>]\{-}\) &': '\1 ' \ } ] -nnoremap c :call switch#Switch(g:switch_const_definitions, {}) +nnoremap c :call switch#Switch({'definitions': g:switch_const_definitions}) nnoremap gd :YcmCompleter GoTo nnoremap d :vs:YcmCompleter GoTo +nnoremap gD :YcmCompleter GoToReferences " format with = -map = (operator-clang-format) -vnoremap = :ClangFormat +call operator#user#define_ex_command('ycmcompleter-format', 'YcmCompleter Format') +map = (operator-ycmcompleter-format) +vnoremap = :YcmCompleter Format " restore = mapping to g= nnoremap g= = vnoremap g= =