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] Show number of lines folded

See original GitHub issue

Current when a block is folded it currently only show ellipses, which I think it could be improved by show the lines of code in the block.

e.g. (using Python as an example)

def printthis(printme):
    print(printme)
    print("how did it print?")

When the code above is folded, it is represented as:

def printthis(printme): ...

Instead of just “…”, it would be very useful to display how many lines are folded.

def printthis(printme): ...(2 lines)...

With short block it is not too difficult to identify the number lines folded by looking at the line number, but for a larger blocks, it would aid significantly by showing the number of line folded.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:47
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
uber6commented, Aug 6, 2021

Thanks bot, but none of the recommendations are like mine.

3reactions
aeschlicommented, Sep 13, 2021

I don’t think this can be done in an extension as there’s no API to access all folded regions. The change would be in the core. Check out https://github.com/microsoft/vscode/tree/main/src/vs/editor/contrib/folding The inline-folded is the css class that adds the ....

Read more comments on GitHub >

github_iconTop Results From Across the Web

Count number of visible lines in document with folding?
Show activity on this post. It works by first expanding all the folds. It then closes folds (globally) until the entire document is...
Read more >
Folded Number Line - NRICH - Millennium Mathematics Project
Find three different ways to get a 'stack total' of 36 using lengths of 21 to 36 inclusive, showing exactly how you fold...
Read more >
is line folded? - How to check for folds in VIM - Stack Overflow
Show activity on this post. The result is a Number. If the line {lnum} is in a closed fold, the result is the...
Read more >
How to change the way that vim displays collapsed/folded lines
The fold style is just like the right hand side of the pic. vim · code-folding · Share.
Read more >
Advanced Folding - Learn Vimscript the Hard Way
Lines with a foldlevel of zero are never included in any fold. Adjacent lines with the same foldlevel are folded together. If a...
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