adrianperreault / maptz.vscode.extensions.customfolding

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Visual Studio Code Custom Folding Extension

This extension enhances the default code folding abilities of Visual Studio Code editor. Regions of code that you'd like to be folded can be wrapped with #region comments.

Custom Folding

The precise format of the comment depends on the language. There are currently two styles of comments:

  • /* #region [optional region name] */
  • <!-- #region [optional region name] -->

For instance, for a C# document, you can define a foldable region with the following tags:

/* #region Main */
public static void Main(string args[])
{
   //Your code goes here
}
/* #endregion */

For HTML style languages, you could define a fodable region with the following tags:

<!-- #region Body -->
<body>
</body>
<!-- #endregion -->

The extension is still alpha quality, so please do log any bugs on Github here.

Commands

The extension also installs a command to wrap a region comment around the current selection.

  • regionfolder.wrapWithRegion (Ctrl+M Ctrl+R)

Installing

You can install the latest version of the extension is available on the Visual Studio Marketplace here.

Alternatively, open Visual Studio code, press Ctrl+P and type:

ext install regionfolder

Source Code

The source code is available on GitHub here.

Other Extensions

View other extensions from Maptz

About

License:MIT License


Languages

Language:TypeScript 95.7%Language:Batchfile 4.3%