Replies: 3 comments
-
@antoyo Given that the total-line-numbers element is rendered separately from the position element: https://github.com/helix-editor/helix/blob/master/helix-term/src/ui/statusline.rs#L154 Shifting around the elements of the statusline would break that formatting. For example, if you move an element (in this case selection) before total-line-numbers, it currently looks like this: With the 14 on the right being the total line numbers. total-line-numbers would either have to be baked into position or we would have to place things in specific orders depending on if they're set, neither of those sound like great options for customization. Other than that we would be looking at the bigger picture on how to let users customize the statusline on a deeper level to include a format string of some sort instead of just an array of elements. Thoughts? Hopefully I didn't misunderstand or overthink it. |
Beta Was this translation helpful? Give feedback.
-
@antoyo @tysteiman What do you think about allowing the user to setting a format string containing the variables
This way the user could use any formatting they want including those three variables and chars like Just to give an example, here is a quick change I made to the
Also here is the minor change to
Edit: also here is the branch with these minor changes: https://github.com/austinletson/helix/tree/improve-display-of-total-line-numbers-in-status-line |
Beta Was this translation helpful? Give feedback.
-
I would be OK with the format string. I'm not sure how much users really want that level of customization. If they don't, perhaps a simpler solution would be to create a new statusline element containing both the line/col and total number of lines. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
Currently, the display for current line and total line numbers in the statusline is separate.
I'd prefer if it could be combined.
For instance, to have something like this:
instead of:
I'm also open to other ideas, but I like having
(current line)/(total line numbers)
.Thanks.
Beta Was this translation helpful? Give feedback.
All reactions