I have been trying to do :noremap j k
and :noremap k j
which works but instead of going up it goes slanted up and down. I want j to move up and k to move down which is opposite in vim. I also tried :map j k
and :map k j
which tells that i m doing recursive mapping and thus everything fails.
Ok, so i got the answer. Noremap does the work. Also, when in vim if something like this is there,
1
2
3
4
5
even with remapping and nothing, the both times cursor go from 1,2,3,4,5.
-
This behavior you have with the cursor going to the first word of the line is not default behavior by Vim, most likely caused by a plug-in... Try
vim --clean
, I believe you will no longer reproduce that behavior with that setting. – filbranden♦ Jun 12 '20 at 14:00
noremap
for non-recursive. The firstn
in your suggestion stands for « normal » – D. Ben Knoble♦ Jun 7 '20 at 12:47nnoremap
(that’s two ns)? Do you want this only in normal mode, or visual and operator-pending as well? – D. Ben Knoble♦ Jun 7 '20 at 12:47j
andk
though? I'd say the most likely cause for this might be concealed or full width characters. I don't think the mapping is what's doing that... – filbranden♦ Jun 7 '20 at 14:18