TypeScript/JavaScript: //#region and //#endregion and //region and //endregion
C#: #region and #endregion
C/C++: #pragma region and #pragma endregion
F#: //#region and //#endregion
PowerShell: #region and #endregion
Python: #region and #endregion
VB: #Region and #End Region
PHP: #region and #endregion
Bat: ::#region and ::#endregion
Each language also has snippets available for the markers. Type '#' and invoke code completion to see them. To have region markers configured for your language, contact the language extension provider.
v1.23增加了CSS/SCSS/更少的代码折叠区域:
CSS/SCSS/Less: /* #region */ and /* #endregion */ or /*#region*/ and /*#endregion*/
SCSS/Less: // #region and // #endregion
增加1.35版:
Go: // region, // endregion and // #region, // #endregion
v1.39增加了使用命令
editor.toggleFold
切换折叠功能。默认情况下,它绑定到Ctrl+KCtrl+L。见https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_39.md#toggle-folding。
由区域进行的代码折叠已随v1.17一起提供。Folding by regions documentation。以及v1.19和1.23。
v1.23增加了CSS/SCSS/更少的代码折叠区域:
增加1.35版:
v.1.36添加了shellscript,请参阅[github问题:添加shellscript折叠标记]。4:
自2017年4月Visual Studio代码版本1.12.0起,请参见文档中的Basic Editing > Folding部分。
默认键为:
*折叠级别:要折叠除最外层类之外的所有类,请尝试CTRL+K,CTRL+1
Macs:使用⌘而不是CTRL(谢谢Prajeet)
Folding已经推出,现在从Visual Studio代码version 0.10.11开始实现。有以下键盘快捷键可用:
折叠折叠光标最里面的未折叠区域:
展开展开光标处的折叠区域:
全部折叠在编辑器中折叠所有区域:
全部展开在编辑器中展开所有区域:
引用:https://code.visualstudio.com/docs/getstarted/keybindings
相关问题 更多 >
编程相关推荐