sorry for the bad title. I could not think of how to better summarise the problem. I should also state, that I am fairly new to vim, so please be a bit considerate :).
I made the following changes in my vimrc file:
set whichwrap+=<,>,[,]
nmap k gk
nmap j gj
nmap <up> k
nmap <down> j
imap <up> <Esc>kli
imap <down> <Esc>jli
In normal mode, it works as desired. In insert more, it does work mostly all right, but the problem comes, when I hit an empty line. I am thrown out of the insert mode. I do not understand why, as it does end with an "i". I tried running these commands "by hand", i.e., typing them out as <Esc>, followed by j, l and i. It works as I would want it to. But when I press <down>, it still kicks me out of the insert mode...
I am using vim 8.2.3458, on linux, in alacritty. Usually, I also use vimtex, but I have disabled it (and everything else) for the purposes of testing and it still made no difference.
Anyone got any ideas? Cheers.
Edit: If I may ask, does this error reproduce for others as well? I know, it is a bit rude to ask this, but at least it would allow me to know, if it is the above code, or something else, that is messed up in my vim install..
nnoremap
version ofnmap
and theinoremap
version ofimap
? The third block of mapping you introduce is interacting with the first at the moment and it is probably not what you want.l
parts can be executed without failure thei
part is not executed and you stay in normal mode.