Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tip: Collapsing other region types #6

Open
MattTree opened this issue Mar 26, 2021 · 2 comments
Open

Tip: Collapsing other region types #6

MattTree opened this issue Mar 26, 2021 · 2 comments

Comments

@MattTree
Copy link

  1. Download source.
  2. Find this line:
if (text.StartsWith("#region", StringComparison.CurrentCultureIgnoreCase))
  1. Add a condition that matches your language. Here's one for C++:
if (text.StartsWith("#region"       , StringComparison.CurrentCultureIgnoreCase) ||
    text.StartsWith("#pragma region", StringComparison.CurrentCultureIgnoreCase))
  1. Build as a Release version.
  2. Uninstall your current version of CollapseRegionExtension.
  3. Open CollapseRegionExtension.vsix found in bin/Release to install your custom version.
SunSerega pushed a commit to SunSerega/CollapseRegionExtension that referenced this issue Apr 23, 2021
according to Vlad-Herus#6
@DouglasPHill
Copy link

Awesome thank you, I changed this line
if (text.StartsWith("<!--"))
to
if (text.StartsWith("<!--") || text.StartsWith(@"//"))

@dglutting
Copy link

if (text.StartsWith("/*")) { var textLow = text.ToLower(); if (textLow.Contains("#region")) { regions.Add(region);

I added this and built locally. It works for regions inside .css files

/* #region Region Name Here */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants