VSCode 快捷键定义
默认的 Toggle explore side bar 快捷键为 Ctrl + B, 但是这和 Vim 的快捷键冲突,解决方法:
File > Preferences > Keyboard Shortcuts,
(1)
输入 ctrl + m,选中默认匹配项,右键单击选择 Remove Keybinding。
然后输入 Toggle Side Bar Visibility,右键单击选择 Change Keybinding,输入 ctrl + m,回车
以后就用 ctrl + m 来打开/关闭 explore side bar。
(2)
(首先输入 opensettings,把 keybinding 改为 Alt + , )
输入 Close Panel,双击 View: Close Panel,输入 ctrl + ,回车
则可以使用 ctrl + , 来关闭运行的 console 窗口。
另,
当焦点在 Editor 窗口时,ctrl + ` 默认打开 terminal 窗口,焦点也跳到 terminal 窗口。
当焦点在 Terminal 窗口是,ctrl + ` 默认关闭 terminal 窗口,焦点跳回 Editor 窗口。
(3)
输入 Focus Right Editor Group,双击,按 ctrl + rightarrow,
当焦点在 Explore 窗口,使用 ctrl + 向右的光标键 使焦点 focus 在 editor 窗口。
输入 Focus on files explorer,双击,按 ctrl + leftarrow,
当焦点在 Editor 窗口,使用 ctrl + 向左的光标 使焦点 focus 在 explore 窗口。
(4)
输入 alt + leftarrow,右键单击 Remove Keybinding
输入 go back,双击, 按 alt + leftarrow,回车
则可以使用 alt + leftarrow 跳到后一个视图。(和 eclipse 的此快捷键也就一致了)
输入 alt + rightarrow,右键单击 Remove Keybinding
输入 go forward,双击, 按 alt + rightarrow,回车
则可以使用 alt + rightarrow 跳到前一个视图。(和 eclipse 的此快捷键也就一致了)
(5)
输入 focus on output,添加光标跳转到 output view 的快捷键为 alt + downarrow,
这样当运行完一个程序后,可以方便拷贝运行结果。
(6)
File > Preferences > Settings > Features > Output
然后 disable 掉 Smart Scroll: Enabled 选项,这样 output view 在每次运行后,就会自动滚动到最底部。
或者直接在 settings.json 文件中加入如下设置,
"output.smartScroll.enabled": false,
如果 enable 此选项,则 output view 在每次运行之后,会固定到输出的最顶端。
(完)