Show total line count in the status bar. (e.g. 120,21 6%) #51423
electron101
started this conversation in
Feature Requests
Replies: 1 comment
-
|
I know it is not what you want but, like vim, you can at least press |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My proposal
Display the total number of lines in the current buffer in the status bar next to the current cursor position.
Currently the status bar shows the cursor position (line and column), but it does not include the total number of lines in the file.
Why does this matter?
Showing the total line count is a common feature in many editors and helps users quickly understand their location in a file.
As a fan of Vim, I find myself missing this feature in Zed. Being able to see the current line relative to the total file length is a small but very helpful piece of context.
Are there any examples or context?
Typical status bars show something like:
Some editors (e.g. Vim) also show file position as a percentage:
The exact formatting of this information is not critical and could be decided by the community or maintainers.
For example, the status bar could display the information in several possible ways:
The specific representation is less important than having access to the total line count, which enables richer status bar information and better navigation context.
Possible approach
The total number of lines is already available from the buffer snapshot.
For example:
I already have a working local prototype of this feature, so I would be happy to contribute a PR if the community agrees on the approach and format.
Beta Was this translation helpful? Give feedback.
All reactions