使用键盘( Ctrl + UpArrow / DownArrow )在编辑器中滚动后,光标停留在原位置,也许后退5-10个屏幕。
是否有命令将光标移动到我正在查看的当前屏幕的中央,以便我可以编辑正在查看的内容?
我可以执行“转到行”( Ctrl + G ,然后输入行号),但是我正在寻找单按键盘快捷键。 / p>
答案 0 :(得分:1)
在您的keybindings.json中尝试一下:
{
"key": "alt+m", // or whatever binding you choose
"command": "cursorMove",
"args": {
"to": "viewPortCenter"
}
}
另请参见:to automatically move cursor as you scroll(如果需要)。