简体   繁体   English

如何在 Visual Studio Code 中创建键盘快捷键来移动 cursor

[英]How to create a keyboard shortcut in Visual Studio Code to move the cursor

Regarding Visual Studio Code shortcuts: What is the command Id to move the cursor one space to the right?关于 Visual Studio Code 快捷方式:将 cursor 向右移动一个空格的命令 ID 是什么? This way I could create a key binding to accomplish this command.这样我就可以创建一个键绑定来完成这个命令。

The command you're looking for is cursorRight .您要查找的命令是cursorRight This is an example of a key binding with this functionality:这是具有此功能的键绑定示例:

{ "key": "ctrl+r", "command": "cursorRight", "when": "editorTextFocus" }

You can change the value of "key" and copy-paste the line in the keybindings.json file to override the default value for that key(s).您可以更改"key"的值并复制粘贴keybindings.json文件中的行以覆盖该键的默认值。 Also adjust the attribute "when" to your needs.还可以根据您的需要调整属性"when"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM