Salman Mohsin <ssmohsin@...
> In my vimrc, I have two entries like:
> map <Down> gj " Down Arrow would take one 'screen line' down
> map <Up> gk " Up Arrow would take one 'screen line' up
> But these are not working correctly. When I press down-arrow key, it
> takes me one screen line down but also one space to the right.
> Doesn't go vertically down. Similary when I press up-arrow key, it
> takes me one screen line up, but also one space to the right. Doesn't
> go vertically.
> How can I make these mapping behave properly??
Avoid putting comments on the same lines as mappings. I guess the space
between the gj or gk and the double quote is the culprit. I have those same
mappings, but the letters j and k are followed immediately by an end-of-line
in the script that does it (the comment describing it is above the mappings,
on a line by itself) and it works perfectly.