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 <buffer> <leader>c :call switch#Switch(g:switch_const_definitions, {})<cr>
+
nnoremap <buffer> gd :YcmCompleter GoTo<CR>
nnoremap <buffer> <C-W>d :vs<CR>:YcmCompleter GoTo<CR>