【问题标题】:multiple key bindings in vscode (visual studio code) cursor right disabled after creation on new keybinding在创建新的键绑定后,vscode(Visual Studio 代码)中的多个键绑定光标右被禁用
【发布时间】:2022-06-12 02:00:18
【问题描述】:
我是 VScode 的新手,我添加了一个新的快捷方式来向右移动光标,因为右箭头键迫使我移动我的手,现在右箭头被禁用,我可以执行其他任务,例如向右移动一个完整的单词由于快捷键已经完全取代了右箭头键,
- 谁能告诉我一个简单的快捷方式,让光标在每行代码后不带右箭头向右移动,例如 print("hello world")cursor here
- 或告诉我如何使我的自定义快捷键序列和右箭头键都工作
我还注意到将光标移动到行尾的默认键绑定(shift+alt+i)从未起作用。
提前谢谢你
【问题讨论】:
标签:
visual-studio-code
vscode-keybinding
【解决方案1】:
我在这里找到了类似的帖子:Visual Studio Code - multiple keyboard shortcuts?
而且我已经修复了向右移动的问题,但是我不能用向上的箭头做同样的事情,无论我设置什么键绑定,如果能够添加这样的 移动快捷方式 而不必影响当前的正确设置
**这是我在 keybiding.json 文件上的当前代码 - 任何人都可以在不破坏当前设置的情况下建议修复此代码吗? **
{
"key": "shift+alt+i",
"command": "-editor.action.insertCursorAtEndOfEachLineSelected",
"when": "editorTextFocus"
},
{
"key": "shift+alt+r",
"command": "cursorRight",
"when": "textInputFocus"
},
{`enter code here`
"key": "Right",
"command": "cursorRight"
}
{
"key": "Left",
"command": "cursorLeft"
}
{
"key": "right",
"command": "-cursorRight",
"when": "textInputFocus"
},
{
"key": "shift+alt+l",
"command": "cursorLeft",
"when": "textInputFocus"
},
{
"key": "left",
"command": "-cursorLeft",
"when": "textInputFocus"
}