Vim / NeoVim: Map <cr> to <esc> and <s-cr> to <cr> </cr></s-cr></esc></cr>

682
drzel

I'd like to use enter to escape insert mode, and use Shift+Enter to insert a new line instead.

The problem is my terminal emulator (Konsole running under Lubuntu) doesn't capture Shift+Enter (nor Ctrl-Enter). Any idea how I might overcome this. Am willing to change terminal emulator if it supports 24-bit colour and can scroll smoothly in NeoVim.

Relevant .vimrc

map <CR> <Esc> map <S-CR> <CR> 
1
Во-первых, Vim относится к при отображении команд как (по крайней мере, в nvim-features-new). Я проверял а также в neovim в urxvt и они не считаются отличными от , Yet Another User 8 лет назад 0
Ctrl-Enter Я могу приступить к работе в LXTerminal так: imap inoremap Shift-Enter, однако, не работает. miyalys 8 лет назад 0

0 ответов на вопрос

Похожие вопросы