Replies: 6 comments
-
It's deliberately not a character so it doesn't obscure the text though |
Beta Was this translation helpful? Give feedback.
-
this would be optional though |
Beta Was this translation helpful? Give feedback.
-
I just wanted to chime in to say that I see the value here. I've been using TUI-based text editors for years and I still second-guess whether my ruler markings are the last column of my preferred width or the first column of overflow. Using a box-drawing character helps make this less ambiguous. But I also agree with @archseer that this loses some information, for example in cases where almost all lines overflow a ruler. One alternative I had in mind would be to permit ranges in the ruler config. If 80 is a preferred linewidth, then this makes it more obvious that 81 is the start of a region of overflow, not the end of acceptable widths. The example below would use the ruler style for all columns >=81. [editor]
rulers = [ 81.. ] Granted, this isn't valid What do you think @aspizu? |
Beta Was this translation helpful? Give feedback.
-
[editor]
ruler-char = "⎸" # defaults to null which means draw bg color
rulers = [10, 20, 30] # rulers are rendered with ${ruler-char}
margin = 81 # col<=81 are rendered with bg color
# defaults to null which doesnt draw a margin |
Beta Was this translation helpful? Give feedback.
-
Howdy all, I have opened PR #9256 that adds this functionality using the config syntax @aspizu suggested. It is opt-in - if the config key is not provided the original behaviour for rulers is used |
Beta Was this translation helpful? Give feedback.
-
I've created PR #11798 to continue work started by @dylangiles (tyvm for the code) It fixes some minor issues in original PR |
Beta Was this translation helpful? Give feedback.
-
Instead of drawing a filled column, optionally
draw a column with the configured character.
This then could be set to a box-drawing character
to get a line as a ruler.
Beta Was this translation helpful? Give feedback.
All reactions