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

Fold select, switch, case #164

merged 1 commit into from Nov 8, 2018


None yet
3 participants

Ben3eeE commented Nov 8, 2018


  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

Fixes #163 by adding fold rules for switch, select and case.

Alternate Designs



Can fold select switch and case

Possible Drawbacks

Someone wants to be unable to fold these things

Applicable Issues

Fixes #163

/cc: @maxbrunsfeld


This comment was marked as resolved.


Ben3eeE commented Nov 8, 2018

Edit: nevermind this doesn't make sense because then the entire else { would be on the same line as well.

While testing this I noticed that if else and if else if doesn't fold correctly:

if else


Code from

I would expect both cases to fold the same way but it doesn't. I have idea how to fix this.

@maxbrunsfeld maxbrunsfeld merged commit 0010d17 into master Nov 8, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@maxbrunsfeld maxbrunsfeld deleted the b3-go-folding branch Nov 8, 2018


This comment has been minimized.


maxbrunsfeld commented Nov 8, 2018



This comment has been minimized.

Toasa commented Nov 8, 2018

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment