I managed to correct my terminal key-code for Shift+Enter
by sending the key-code Vim apparently expects. Depending on your terminal,
(Adding Ctrl+Enter as a bonus!)
iTerm2
对于单个配置文件打开优先 → Profiles → Keys → [+](添加)
对于所有打开的配置文件优先 →
Keys → [+](添加)
urxvt,附加到您的.Xresources
file:
URxvt.keysym.S-Return: \033[13;2u
URxvt.keysym.C-Return: \033[13;5u
阿拉克里蒂, under key_bindings
,将以下内容添加到您的~/.config/alacritty/alacritty.yml
:
- { key: Return, mods: Shift, chars: "\x1b[13;2u" }
- { key: Return, mods: Control, chars: "\x1b[13;5u" }
Kitty, in ~/.config/kitty/kitty.conf
:
map shift+enter send_text all \x1b[13;2u
map ctrl+enter send_text all \x1b[13;5u
Windows 终端
将这些添加到 JSON 配置的 actions 数组中(通过设置):
{
"keys": "shift+enter",
"command": { "action": "sendInput", "input": "\u001b[13;2u" }
},
{
"keys": "ctrl+enter",
"command": { "action": "sendInput", "input": "\u001b[13;5u" }
}