Vertical Line To Mark Margin?

45 views
Skip to first unread message

Thomas Passin

unread,
Jun 1, 2020, 4:59:18 PM6/1/20
to leo-editor
If this isn't an option already, it would be a useful enhancement.  Many text editors show a thin vertical line at 80 columns, or whatever you have set.  This helps you make sure you don't run over the intended right margin while writing code.  Presumably it would be configured via and @setting value.  It could also reduce the number of complaints from pylint.

Does this already exist, and if so, what is the setting's name?

Edward K. Ream

unread,
Jun 2, 2020, 9:16:21 AM6/2/20
to leo-editor
On Mon, Jun 1, 2020 at 3:59 PM Thomas Passin <tbp1...@gmail.com> wrote:
If this isn't an option already, it would be a useful enhancement.  Many text editors show a thin vertical line at 80 columns, or whatever you have set.  This helps you make sure you don't run over the intended right margin while writing code.  Presumably it would be configured via and @setting value.  It could also reduce the number of complaints from pylint.

Leo has no such setting. Apparently, QTextEdit doesn't have a way to do this natively. Anything is possible with a custom paint method.

Edward

Thomas Passin

unread,
Jun 2, 2020, 10:19:48 AM6/2/20
to leo-editor
I have done something like this for HTML pages using CSS by specifying a left boundary.  By using left margin and left padding combinations, it is possible to display indented lists (i.e., like Leo outlines) with left vertical guide lines that follow the indentation.  I wonder if this can be done on the right with some combination of margin and overflow settings (to avoid unwanted wrapping at the visible line).  And if it can, I wonder if a QTextEdit would support it.

I've attached an example of this left-margin-by-css effect.
left_margin_guide_lines.png

Edward K. Ream

unread,
Jun 3, 2020, 7:30:29 AM6/3/20
to leo-editor
On Tue, Jun 2, 2020 at 9:19 AM Thomas Passin <tbp1...@gmail.com> wrote:

Leo has no such setting. Apparently, QTextEdit doesn't have a way to do this natively. Anything is possible with a custom paint method.

Pyzo shows tab stops with vertical lines. I have just created #1599 for this.

Edward

Thomas Passin

unread,
Jun 3, 2020, 8:00:38 AM6/3/20
to leo-editor
Thanks!

Edward K. Ream

unread,
Jun 3, 2020, 8:35:06 AM6/3/20
to leo-editor


On Wed, Jun 3, 2020 at 7:00 AM Thomas Passin <tbp1...@gmail.com> wrote:
Thanks!

You're welcome. Not sure when this is going to happen.

Edward
Reply all
Reply to author
Forward
0 new messages