简体   繁体   English

VSCode:(控制)增加/减少当前拆分窗格宽度/高度的快捷键?

[英]VSCode: Shortcut key for (controlling) increasing/decreasing current split panes width/height?

Is there a quick keyboard shortcut to control the width of the current split pane, at least increasing and decreasing it?是否有快速键盘快捷键来控制当前拆分窗格的宽度,至少增加和减少它?

for vim users it would be:对于 vim 用户,它将是:

:vertical resize 80 :res +5 :res -5 :vertical resize +5 :vertical resize -5 :vertical resize 80 :res +5 :res -5 :vertical resize +5 :vertical resize -5

and so on...等等...

There is no default shortcut for this but you can make your own.对此没有默认快捷方式,但您可以创建自己的快捷方式。

The following works on vscode version 1.11.2 on Linux but it should be the same for Windows users:以下适用于 Linux 上的 vscode 1.11.2 版,但对于 Windows 用户应该是相同的:

Go to File > Preferences > Keyboard shortcuts转到File > Preferences > Keyboard shortcuts

(or you can use the shortcut ctrl + k ctrl + s to open it) (也可以使用快捷键ctrl + k ctrl + s打开)

Search for current view size and you can set your custom key combinations for decreasing and increasing the size of the current view.搜索current view size ,您可以设置自定义组合键以减小和增加当前视图的大小。

On a Mac (If you are on windows replace cmd with ctrl)在 Mac 上(如果你在 Windows 上,用 ctrl 替换 cmd)

cmd-k cmd-s

Type类型

current view size

Double click on双击

View:Decrease Current View Size 

Type whatever key combo you want, I like using this输入任何你想要的组合键,我喜欢用这个

F3

Double click on双击

View:Increase Current View Size 

Type whatever key combo you want, I like using this输入任何你想要的组合键,我喜欢用这个

F4

Rejoice

Code ( File on window ) >> Preferences >> Keyboard shortcuts.代码(窗口上的文件)>> 首选项>> 键盘快捷键。

to the top right there is an icon to open user keyboard shortcuts.右上角有一个用于打开用户键盘快捷键的图标。

adjust the keys to your linkings.调整链接的键。

  {
    "key": "ctrl+shift+o",
    "command": "workbench.action.decreaseViewSize"
  },
  {
    "key": "ctrl+shift+i",
    "command": "workbench.action.increaseViewSize"
  }

The Increase Current View Size and Decrease Current View Size commands adjust both the width and the height of the view. Increase Current View SizeDecrease Current View Size命令调整视图的宽度和高度。

In case you would like too adjust just the width of the editor, use Decrease editor width and Increase editor width commands.如果您只想调整编辑器的宽度,请使用Decrease editor widthIncrease editor width命令。

In split view, if you double click the current editor tab then it will increase to max, double click again and it will reset to 50%.在拆分视图中,如果您双击当前编辑器选项卡,它将增加到最大值,再次双击它将重置为 50%。 Not a shortcut key but pretty nice nonetheless不是快捷键,但还是不错的

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

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