[folding] Show number of lines folded
See original GitHub issueCurrent 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:
- Created 2 years ago
- Reactions:47
- Comments:13 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks bot, but none of the recommendations are like mine.
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...
.