undefinedfix
Sign in

VIM setting shortcut key

jmlui edited in Thu, 14 Apr 2022

I use nerdtree in VIM, which has a very useful shortcut

Ctrl+w+w

It's used to switch horizontally, but I think it's too much trouble. I want to set up another shortcut for this key combination, such as

Ctrl+Alt+Left

I don't know how to configure it in. Vimrc

1 Replies
Ove
commented on Thu, 14 Apr 2022

If you say left is the direction key, vimer had better not use the direction key.

My shortcut key to switch windows is Ctrl + H, J, K, L. Respectively corresponding to the left, down, up, right switch. I map < C-W > w to < C-W > by the way

nnoremap <c-w> <c-w>w
nnoremap <c-j> <c-w>j
nnoremap <c-h> <c-w>h
nnoremap <c-k> <c-w>k
nnoremap <c-l> <c-w>l
lock This question has been locked and the reply function has been disabled.