sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
809 stars 39 forks source link

Coloured indentation lines #4494

Open jdaw1 opened 3 years ago

jdaw1 commented 3 years ago

Sublime has helpful vertical indentation lines, spanning indentation blocks.

Behold!

![Grey vertical lines](http://www.jdawiseman.com/papers/bugs/20210619_grey_indentation_lines.png)

It would much aid the eye if these lines were not all the same. Perhaps there could be a three rotation of colours, {grey, red, blue} (no green to help most of the colour blind), and an alternation of dotted and solid, resulting in a period-six cycle.

It would assist the speedy perception of matching indentations.

Thank you.

(FTR, first mentioned by me in this post, but only as an aside.)

jfcherng commented 3 years ago

Built-in is another thing but are you interested in a plugin which may satisfied your need?

Configured https://packagecontrol.io/packages/BracketHighlighter:

https://user-images.githubusercontent.com/6594915/122662678-5fbf4600-d1c7-11eb-9e17-ba0ece12e67b.mp4

jwortmann commented 3 years ago

@jfcherng Your video looks like it is exactly what the built-in "indent_guide_options" setting does, e.g. "indent_guide_options": ["draw_normal", "draw_active"] or "indent_guide_options": ["draw_normal", "draw_active_single"]. You may want to adjust the "active_guide" and "stack_guide" global colors in your color scheme if you want them to stand out more.

But I think the request is rather to allow permanently different colors/styles for each indent guide, and independently of where the cursor is.

jdaw1 commented 3 years ago

the request is rather to allow permanently different colors/styles for each indent guide, and independently of where the cursor is.

Yes, this. And not so much ‘allow’ as have by default: the suggested small recolouration can’t hurt at all.

jdaw1 commented 3 years ago

The colours in this test example this are too strong: the the blue and orange should be desaturated. But it gives an idea. And rather than solid lines maybe it should alternate between [1 1] dashing and [3 3] dashing.

![Example coloured indentation lines](http://www.jdawiseman.com/papers/bugs/20210620_grey_indentation_lines.png)
jdaw1 commented 3 years ago

New test example. Three colours, two dashings: [1 1]; [3 3]. Still wrong: the orange is now a touch too faint.

![test example of 22nd June](http://www.jdawiseman.com/papers/bugs/20210622_grey_indentation_lines.png)