This is a quick post with some shortcuts I just implemented in my vimrc file that I just felt compelled to share with the world.
It answers the question, “Are you tired of hitting Ctrl-W to move around windows?” Then do I have the solution for you!
Pop these guys into your vimrc file:
nnoremap <S-C-h> <C-W>h
nnoremap <S-C-j> <C-W>j
nnoremap <S-C-k> <C-W>k
nnoremap <S-C-l> <C-W>l
Save it and reload your files (or source it into one). Voilà! Now you can enjoy single-press window moving by holding down shift and control and using the movement keys (hjkl). You’ll need more maps if you want to use the arrow keys, but in the time it takes you to get to those, you may as well just press Ctrl + W and a movement key!
Speaking of sticking to the home row as much as possible, don’t forget that you can use Ctrl + [ instead of Esc to return to normal mode.
Enjoy!
Kevin
VIM: Moving around windows made a little easier (and how to escape without Esc)
This is a quick post with some shortcuts I just implemented in my vimrc file that I just felt compelled to share with the world.
It answers the question, “Are you tired of hitting Ctrl-W to move around windows?” Then do I have the solution for you!
Pop these guys into your vimrc file:
nnoremap <S-C-h> <C-W>h
nnoremap <S-C-j> <C-W>j
nnoremap <S-C-k> <C-W>k
nnoremap <S-C-l> <C-W>l
Save it and reload your files (or source it into one). Voilà! Now you can enjoy single-press window moving by holding down shift and control and using the movement keys (hjkl). You’ll need more maps if you want to use the arrow keys, but in the time it takes you to get to those, you may as well just press Ctrl + W and a movement key!
Speaking of sticking to the home row as much as possible, don’t forget that you can use Ctrl + [ instead of Esc to return to normal mode.
Enjoy!
Kevin