Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim cursor goes line down when esc mapped to jk

Tags:

vim

I have

imap jk <C-[>

in my vimrc, but when I use it on the end of line (when cursor is on $ when list is on) cursor goes to beginning of next line. How to fix it?

like image 997
Sławosz Avatar asked Nov 01 '25 22:11

Sławosz


1 Answers

It works normally for me.

I assume interfering mappings or settings.

First you should try

:inoremap jk <C-[>

can you provide more details

  • version
  • verbose set 1
  • map j
  • map k
  • map jk

I have a hunch it might be the virtualedit settings or stuff like that interfering


1 get it with

:redir >> ~/file.log
:verbose set
:redir END

like image 110
sehe Avatar answered Nov 04 '25 02:11

sehe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!