I sometimes find document traversal to be too slow in Vim when using h, j, k, l
.
Is there a way to temporally increase the number of lines / characters that these keys move the cursor? (I.e. instead of moving 1j
, pressing j
will move 3j
)
Edit: Solution:
:map <F8> :noremap j 3j <CR>
:map <S-F8> :noremap j j <CR>
I wanted something like this so that I can easily browse longer bodies of code that am not necessarily familiar it. This approach allows me to easily toggle between "browsing" mode and "coding" mode.
Answered by Jay is sufficient, I would like to add the following !
There are many different kinds of navigation possible in vim, ( where as the h, j, k, l are just line navigation ). Some more are:
Refer this write up to find out the short cut keys to do it: Essential Vim editor navigation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With