X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/58d46aa2146196e37a219175ae5710588d2bb6b2..refs/heads/cadscan:/vim/ftplugin/cpp.vim?ds=inline diff --git a/vim/ftplugin/cpp.vim b/vim/ftplugin/cpp.vim index be1b64d..23503b8 100644 --- a/vim/ftplugin/cpp.vim +++ b/vim/ftplugin/cpp.vim @@ -21,6 +21,15 @@ augroup fswitch au BufEnter *.cpp let b:fswitchlocs = 'reg:|source|include/**|' augroup END +let g:switch_const_definitions = + \ [ { + \ '\%(const \)\@!\([[:alnum:]_:<>]\{-}\) \%(&\)\@!': 'const \1 ', + \ 'const \([[:alnum:]_:<>]\{-}\) &\@!': 'const \1 &' , + \ 'const \([[:alnum:]_:<>]\{-}\) &': '\1 ' + \ } ] + +nnoremap c :call switch#Switch(g:switch_const_definitions, {}) + nnoremap gd :YcmCompleter GoTo nnoremap d :vs:YcmCompleter GoTo