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.

1 Answer 1


"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>
  • 2
    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
    Commented Aug 20, 2018 at 18:42
  • On Ubuntu 19.10 using Alacritty as a terminal I was able to map to <S-Cr> in nvim without problem using (stackoverflow.com/questions/16359878/vim-how-to-map-shift-enter/…). For regular Vim however I think @Mass' comment still applies.
    – SidOfc
    Commented Apr 9, 2020 at 20:48

Your Answer

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

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