Вопрос

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.

Это было полезно?

Решение

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.

Другие советы

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

:nnoremap <C-q> <C-]>
:nnoremap <C-a> <C-t>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top