gpt4 book ai didi

visual-studio-code - Vim VS 代码扩展 : How to remap "i" in normal mode to Escape key?

转载 作者:行者123 更新时间:2023-12-01 23:27:47 34 4
gpt4 key购买 nike

所以我想将“i”重新映射为转义键,因为我发现它更容易记住。但是当我对 VS Code 的 settings.json 执行此操作时:

"vim.normalModeKeyBindings": [
{
"before": [
"i"
],
"after": [
"<Esc>"
]
}
]

“i”键被禁用,没有任何反应。只是禁用了插入模式中的“i”键。帮助,我是 vim 的新手。

最佳答案

在 Vim 中,i 键绑定(bind)用于从正常模式进入插入模式。 esc 键通常用于进入正常模式。将 i 设置为 esc 绝对是一种反模式。通常人们将 CapsLock 设置为 esc 键,因为它离键盘的主行更近,你不必伸到 esc 键那么远,因为它有时很烦人。我还看到一些人使用 jj 而不是 esc

不过,要回答您的问题,只需从命令面板 (Ctrl+Shift+p) 打开Preferences: Open Keyboard Shortcut 并搜索 vim_escape。然后双击它并输入 key i 然后再次按 enter。这应该能让您获得想要的结果。

再次建议您不要继续进行此重新映射。

关于visual-studio-code - Vim VS 代码扩展 : How to remap "i" in normal mode to Escape key?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66927509/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com