简体   繁体   English

在侧面板中最大化 VSCode 中的终端

[英]Maximize terminal in VSCode when in side panel

In previous versions of VSCode there was an arrow icon at the top of the panel that could be used to maximize the panel, for instance the terminal.在以前版本的 VSCode 中,面板顶部有一个箭头图标,可用于最大化面板,例如终端。 I do not know exactly in which version but that button is now gone and I'm unable to find an equivalent.我不知道具体是哪个版本,但那个按钮现在不见了,我找不到对应的按钮。

My question is: how can I maximize the terminal so it takes the whole VSCode window?我的问题是:如何最大化终端以便它占用整个 VSCode window? Is there any way to get the button back?有什么办法让按钮回来吗?

Which version of VSCode are you using, and in which OS?您使用的是哪个版本的 VSCode,以及在哪个操作系统中?

On Mac, and with 1.65.2 (the most recent update by now), I have it in the right corner, near the X button:在 Mac 上,使用 1.65.2(目前最新的更新),我把它放在右上角,靠近X按钮: 扩展终端按钮示例

Shortcuts捷径

Now talking about shortcuts to make your life easier, there are 2 you should be aware of.现在谈论使您的生活更轻松的捷径,您应该注意两个。 PS: Remember that to change any shortcuts, just go over VSCode Command Palette and type Keyboard Shortcuts to change them. PS:请记住,要更改任何快捷键,只需查看 VSCode 命令面板并键入Keyboard Shortcuts即可更改它们。

Maximise panel size最大化面板尺寸

There are no default shortcuts for those, in both Windows and Mac.在 Windows 和 Mac 中,这些都没有默认快捷方式。 If you want to set any, the name of the shortcut is View: Toggle Maximized Panel :如果你想设置任何,快捷方式的名称是View: Toggle Maximized Panel 切换最大化面板快捷方式

Increasing / decreasing terminal size增加/减少终端尺寸

Now talking shortcuts, if you want to resize your terminal window, in Mac there's a native shortcut that allows to increase / decrease terminal size with Cmd + Ctrl + Arrow Up / Arrow Down .现在谈论快捷方式,如果您想调整终端窗口的大小,在 Mac 中有一个本机快捷方式,允许使用Cmd + Ctrl + Arrow Up / Arrow Down增加/减少终端大小。 There's no default for Windows. Windows 没有默认设置。 If you want to set / change those shortcuts, they are called Terminal: Resize Terminal Down and Terminal: Resize Terminal Up :如果您想设置/更改这些快捷方式,它们被称为Terminal: Resize Terminal DownTerminal: Resize Terminal Up 调整终端快捷方式的大小

Terminal panel on the side侧面的端子面板

If you added your panel to either left or right, then the mark to make it fullscreen changes.如果您将面板添加到左侧或右侧,则使其全屏的标记会更改。 After clicking on the arrow below, it'll hide all your files and make the terminal to run in the whole screen for VSCode:单击下面的箭头后,它将隐藏所有文件并使终端在 VSCode 的整个屏幕中运行: 全屏,侧面有终端

I also got the arrow disappeared, but i manage to bring it back by with command:workbench.action.alignPanelCenter But i don't know i un align it in the first place我也让箭头消失了,但我设法通过command:workbench.action.alignPanelCenter但我不知道我首先取消对齐它

So maybe it will work with you所以也许它会和你一起工作

Panel can be maximized when centered.居中时面板可以最大化。 Example: If panel is not centered and the Maximize button is missing you also cannot use the command by hitting示例:如果面板未居中且缺少“最大化”按钮,您也无法通过点击来使用该命令

Shift-Ctrl-P View: Toggle Maximize Panel Shift-Ctrl-P View: Toggle Maximize Panel

Fix: run these commands (press Shift-Ctrl-P then begin typing)修复:运行这些命令(按Shift-Ctrl-P然后开始输入)

  1. First command will enable the maximize button第一个命令将启用最大化按钮

View: Set Panel alignment to Center

  1. Second command will now work to Maximize (or just press the button that shows up now)第二个命令现在可以最大化(或者只需按下现在显示的按钮)

View: Toggle Maximize Panel

Blue and skube have the right answer to the original question. Blue 和 skube 对原问题有正确答案。 I cannot comment so summarize an answer using commands that can be pasted to verify.我无法发表评论,因此使用可以粘贴以进行验证的命令来总结答案。

To get the maximize arrow on the left panel...要获得左侧面板上的maximize arrow ...

在此处输入图像描述

Left-click the bottom bottom panel, then choose Move Panel Left左键单击底部底部面板,然后选择Move Panel Left

在此处输入图像描述

To get the maximize arrow on the bottom panel...要获得底部面板上的maximize arrow ...

在此处输入图像描述

First, press the Customize Layout button首先,按下Customize Layout按钮

在此处输入图像描述

And select Center Panel Alignment和 select Center面板 Alignment

在此处输入图像描述

Then move the panel back to the bottom.然后将面板移回底部。

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

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