Microsoft/vscode

[folding] Show number of lines folded

Open

#130.250 aperta il 6 ago 2021

Vedi su GitHub
 (15 commenti) (64 reazioni) (1 assegnatario)TypeScript (10.221 fork)batch import
editor-foldingfeature-requesthelp wanted

Metriche repository

Star
 (74.848 star)
Metriche merge PR
 (Merge medio 11h 43m) (1000 PR mergiate in 30 g)

Descrizione

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.

Guida contributor