如何折叠 Visual Studio Code for Windows 中的代码部分? [英] How do I collapse sections of code in Visual Studio Code for Windows?

查看:39
本文介绍了如何折叠 Visual Studio Code for Windows 中的代码部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何折叠或折叠 Visual Studio Code 中的代码部分?

How do I fold or collapse sections of code in Visual Studio Code?

是否支持此功能?

推荐答案

折叠 自 Visual Studio Code 版本 0.10.11 起已推出并实施.有以下键盘快捷键可用:

Folding has been rolled out and is now implemented since Visual Studio Code version 0.10.11. There are these keyboard shortcuts available:

  • Fold 折叠光标处最里面的未折叠区域:

  • Fold folds the innermost uncollapsed region at the cursor:

  • Ctrl + Shift + [ 在 Windows 和 Linux 上
  • + + [ 在 macOS 上
  • Ctrl + Shift + [ on Windows and Linux
  • + + [ on macOS

展开展开光标处的折叠区域:

Unfold unfolds the collapsed region at the cursor:

  • Ctrl + Shift + ] 在 Windows 和 Linux 上
  • + + ] 在 macOS 上
  • Ctrl + Shift + ] on Windows and Linux
  • + + ] on macOS

Fold All 折叠编辑器中的所有区域:

Fold All folds all regions in the editor:

  • Ctrl + (K => 0)(零)在 Windows 和 Linux 上
  • + (K => 0)(零)在 macOS 上
  • Ctrl + (K => 0) (zero) on Windows and Linux
  • + (K => 0) (zero) on macOS

全部展开展开编辑器中的所有区域:

Unfold All unfolds all regions in the editor:

  • Ctrl + (K => J) 在 Windows 和 Linux 上
  • + (K => J) 在 macOS 上
  • Ctrl + (K => J) on Windows and Linux
  • + (K => J) on macOS

参考资料: https://code.visualstudio.com/docs/getstarted/keybindings

这篇关于如何折叠 Visual Studio Code for Windows 中的代码部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆