question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[folding] Collapse ending brace to the same line

See original GitHub issue

Consider a large JavaScript file

function a() {
  ...
}

function b() {
  ...
}

function c() {
  ...
}

and so on...

Collapsing all currently yields:

function a() { ...
}

function b() { ...
}

function c() { ...
}

and so on...

This would be more readable if the closing brace was on the same line:

function a() { ... }

function b() { ... }

function c() { ... }

and so on...

Here is how other prominent editors handle the above:

Atom

image

Brackets

image

Sublime Text 3

image


VS Code

image

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:295
  • Comments:80 (24 by maintainers)

github_iconTop GitHub Comments

49reactions
PassTheMayocommented, Oct 1, 2019

This has been open for over 3 years now, and no progress on getting this implemented. It’s sad that such an amazing editor doesn’t have this feature…

Edit: It has also been in the backlog queue for 3 years, and it’s one of the oldest to be there…

40reactions
Spowncommented, Aug 28, 2017

I’m for the current model, but since people still think there is something to be corrected I think a preference is in order, something like editor.foldingConsumeLastLine: bool

Read more comments on GitHub >

github_iconTop Results From Across the Web

vscode code folding not showing closing brace - Stack Overflow
foldingStrategy ": "auto" the block-closing bracket and everything after on the same line gets eaten up. Unlike it is with "editor.
Read more >
Collapse vim folds to a single line, similar to Atom or Sublime ...
In Vim, all lines within a fold will be collapsed to a single line, ... (e.g. it will fail if the end statement...
Read more >
Language Configuration Guide - Visual Studio Code
A folding region starts when a line has a smaller indent than one or more following lines, and ends when there is a...
Read more >
Folding sections - VS Code Can Do That - Workshop - GitBook
Use VS Code's folding feature to fold the svg lines. Put your cursor anywhere on the line ... On the line just above...
Read more >
Folding - Vim Tips Wiki - Fandom
Folding methods · manual – folds must be defined by entering commands (such as zf) · indent – groups of lines with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found