0

Here is a situation. I use deoplete but since the pop-up menu when I type in something already puts the cursor at the first item on the list, when I type in return, it inserts a new line.

So I want to type in return + shift to insert a new line (move the cursor to the next line on insert mode) and typing in just return key adds the completion target.

Is this possible? I use neovim 0.3.1.

0

"return + shift" (AKA <S-Enter>) cannot be mapped in Nvim, unless you're using a GUI that captures "shift" and separately. But "alt + return" (<A-Enter>) can be mapped.

:inoremap <A-Enter> <C-e><Enter>
  • 1
    in Konsole and vim, shift-enter produces ^[OM, so it's perfectly mappable using say set <f26>=^[OM. set <s-enter> is not recognized, however. – Mass Aug 20 '18 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.