一次摺疊:ctrl+k+0,或是分開按:ctrl+k,ctrl+0
一次展開:ctrl+k+j ,或是分開按:ctrl+k,ctrl+j
摺疊數字0表全部摺疊,1則摺疊第一層,以此類推。
如果是Mac,將ctrl改為command。
摺疊程式碼:
Language | Start region | End region | |
Bat | ::#region or REM #region | ::#endregion or REM #endregion | |
C# | #region | #endregion | |
C/C++ | #pragma region | #pragma endregion | |
CSS/Less/SCSS | /*#region*/ | /*#endregion*/ | |
Coffeescript | #region | #endregion | |
F# | //#region or (#_region) | //#endregion or (#_endregion) | |
Java | //#region or //<editor-fold> | //#endregion or //</editor-fold> | |
Markdown | <!-- #region --> | <!-- #endregion --> | |
Perl5 | #region or =pod | #endregion or =cut | |
PHP | #region | #endregion | |
PowerShell | #region | #endregion | |
Python | #region or # region | #endregion or # endregion | |
TypeScript/JavaScript | //#region | //#endregion | |
Visual Basic | #Region | #End Region |
官方文件:Basic Editing
本文是否對您有幫助?