Instead of remapping, you should consider the other options for moving the cursor around, i.e.
C-D Move the cursor Down one page (controlled by the 'scroll' option)
C-U Move the cursor Up one page (controlled by the 'scroll' option)
M Move the cursor to the Middle line of the window
H Move the cursor to the Highest line of the window
L Move the cursor to the Lowest line of the window
Also, considering you know where you want to go (which is not the case all the time), take advantage of the /
, ?
, G
, %
commands:
/pattern Search for the next pattern
?pattern Search for the previous pattern
NG Go to line N (Ngg does the same)
N% Go to the Nth percentage of the file.
If you are in a structured language, note the following commands that moves the cursor to the start/end of the following/previous function: ]m
, ]M
, [m
, [M
.
Doing some C/C++/... ? [#
, ]#
jumps to conditional macros (#if
, #else
, ...)
Moving across /* */
comments? [*
, ]*
, [/
, ]/
are your friends.
You can also jump to the next/previous {}()
with [{
,[(
, ]}
, ])
.
Soo, my point here is that you already have a lot of ways to move around in Vim (there's more than the little list I made). So I would suggest learning those ways before trying to remap core commands as j
or k
.
Ctrl-E
?hjkl
are for moving the cursor while<C-u>
,<C-d>
and friends are for scrolling.