VS Code - 键盘滚动后将光标移动到当前屏幕中心的键盘快捷键

VS Code - keyboard shortcut to Move Cursor to the center of current screen After Keyboard Scrolling

使用键盘在编辑器中滚动后 (Ctrl+UpArrow/DownArrow ), 光标停留在原来的位置,可能向后 5-10 个屏幕。

是否有命令将光标移动到我正在查看的当前屏幕的中心,以便我可以编辑我正在查看的任何内容?

我可以做 "Go To Line"(Ctrl+G,然后输入行号),但我正在寻找单击键盘快捷键。

在您的 keybindings.json 中试试这个:

{
  "key": "alt+m",           // or whatever binding you choose
  "command": "cursorMove",
  "args": {
      "to": "viewPortCenter"
  }
}

另请参阅: 如果需要的话。