简体   繁体   English

Visual Studio 代码 - 键盘快捷键 - 全部展开/折叠

[英]Visual studio code - keyboard shortcuts - expand/collapse all

试图在 Intellij 中找到相当于Ctrl + Shift + - 的折叠/展开所有功能。

Here it is.这里是。

Ctrl+Shift+[    Fold (collapse) region  editor.fold
Ctrl+Shift+]    Unfold (uncollapse) region  editor.unfold
Ctrl+K Ctrl+[   Fold (collapse) all subregions  editor.foldRecursively
Ctrl+K Ctrl+]   Unfold (uncollapse) all subregions  editor.unfoldRecursively
Ctrl+K Ctrl+0   Fold (collapse) all regions editor.foldAll
Ctrl+K Ctrl+J   Unfold (uncollapse) all regions

Take Look at Visual studio Code Keybindings section at this link.在此链接中查看 Visual Studio Code Keybindings部分。

Also Platform specific Key board shortcuts available in pdf.here is the links pdf中还提供了特定于平台的键盘快捷键。这里是链接

Windows , MAC , Linux Windows , MAC , Linux

You can set custom values for that.您可以为此设置自定义值。

  1. Open the Command Palette ( + + P or F1 on Mac)打开命令面板(在 Mac 上为 + + PF1
  2. Search Open Keyboard Shortcuts搜索Open Keyboard Shortcuts
  3. Then search for collapse然后搜索collapse
  4. Finally click the + sign near the Collapse All and Collapse Folders in Explorer options and set the shortcuts like I did最后单击“ Collapse Folders in Explorer Collapse All和“ Collapse Folders in Explorer选项附近的+号,然后像我一样设置快捷方式

键盘 vscode 折叠所有快捷键

Or you can open keybindings.json file and add this to the main array.或者您可以打开keybindings.json文件并将其添加到主数组中。

 ,
  {
    "key": "cmd+k cmd+s",
    "command": "search.action.collapseSearchResults"
  },
  {
    "key": "cmd+k cmd+e",
    "command": "workbench.files.action.collapseExplorerFolders"
  }

Go to File --> Preferences --> Keyboard Shortcuts (or Ctrl+K Ctrl+S)转到文件 --> 首选项 --> 键盘快捷键(或 Ctrl+K Ctrl+S)

Search for the word fold all搜索单词全部折叠

The ones you need are:你需要的是:

  • Fold All全部折叠
  • Unfold All展开全部

Set your custom keyboard shortcut设置自定义键盘快捷键

One simple way I use is:我使用的一种简单方法是:

  1. Launch command pallete with Ctrl + Shift + P使用Ctrl + Shift + P启动命令面板
  2. Search for Collapse Folders in Explorer Collapse Folders in Explorer搜索Collapse Folders in Explorer
  3. Press EnterEnter

You can also define a custom shortcut for this command in settings.您还可以在设置中为此命令定义自定义快捷方式。

Go to 'Keyboard Shortcuts' and type in search input: "fold all regions".转到“键盘快捷键”并输入搜索输入:“折叠所有区域”。 Uoy see fold/unfold (expand/collapse) commands and shortcuts. Uoy 查看折叠/展开(展开/折叠)命令和快捷方式。 Use or change them.使用或更改它们。

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

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