Home
键将光标移动到行的虚拟起点,换句话说就是第一个非空格字符。是否(或我可以定义)热键到达一个真正的行开头(字符索引为零)?
答案 0 :(得分:1)
如果你安装了我写的扩展程序,你可以这样做:
https://marketplace.visualstudio.com/items?itemName=BillStewart.extended-cursormove
只需将 home 和 shift + home 的键绑定添加到keybindings.json
文件中; e.g:
[
{
"key": "home",
"command": "extension.extendedCursorMove.cursorHome",
"when": "editorTextFocus"
},
{
"key": "shift+home",
"command": "extension.extendedCursorMove.cursorHomeSelect",
"when": "editorTextFocus"
}
]