Why VIM's (jk) navigate file line instead of screen line? [closed]
Why VIM set the default line navigation (jk) to navigate file开发者_StackOverflow中文版 line instead of screen line. Is there any use-case when this behavior is desirable?
You can change the behavior by adding these to your .vimrc:
nnoremap j gj
nnoremap k gk
Actually this is a desirable case particularly for blockwise selection and alignment of lines.
I particularly appreciate j and k to be consistent, which means ‘move to next file line, same column’.
Just consider that you can do this: by using CTRL-V and then j$.
Of course this is a completely random example and I never had any error accessing SO.
精彩评论