1

I currently have inoremap <M-j> <C-\><C-o>gj in my config but I would like to avoid triggering all InsertLeave autocommand when doing this. inoremap <M-j> <cmd>normal! gj<CR> works for this, but it behaves incorrectly when the cursor is at the last position of the line in insert mode (just like <C-o>gj would).

Any thoughts on how to achieve this on Neovim nightly?

2
  • 1
    Define "but it behaves incorrectly when the cursor is at the last position of the line in insert mode".
    – romainl
    Jan 22 at 6:28
  • @romainl by the correct behavior I mean the same as <c-\><c-o>gj.
    – 0x539
    Jan 23 at 19:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.