Question

I am browsing long source code using vim+cscope+ctags. I find it really cumbersome to always press <C-]> and <C-T> as the keys are located far apart. I want to copy these key bindings to <C-Q> and <C-A> so that both the key bindings work in VIM.

Was it helpful?

Solution

It should be :

nnoremap <C-q> <C-]>
nnoremap <C-a> <C-t>

However I would discourage these mappings because they would cause issues.

  • <C-a> in vim is used to increment the number under the cursor by 1, <C-x> similarly is for decrementing a number under the cursor by 1.

OTHER TIPS

So, what's the problem? Simple normal mode mappings will do:

:nnoremap <C-q> <C-]>
:nnoremap <C-a> <C-t>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top