Sublime Forum

Fix treatment of indentation guides

#1

There are two issues I have with the current treatment of indentation guides:

  1. When the cursor is scrolled out of the view, any coloring of the active guide is lost. This makes the guide much less useful for large blocks (not coincidentally, those are where guides are most useful).

For reference, my guide’s .tmTheme:

<key>guide</key> <string>#cccccc</string> <key>stackGuide</key> <string>#cccccc</string> <key>activeGuide</key> <string>#444444</string>

  1. The “active” guide should take braces into account, so that when the cursor is beside braces that block’s guide is active. Currently most active guides are “off by one”. See below:

0 1 | A | if (true) {B | | exit; D | }C
With the cursor at positions A, B, or C, the active guide is at level 0. At position D, the active guide is level 1. I think positions B and C should also be level 1 (A stays level 0 since it is not beside a cursor). This is the behavior of Komodo Edit as well.

0 Likes

Bug?: "indent_guide_options": ["draw_active"]
Nightly Build 2202
#2

Wondering if you saw this, Jon? Is the current behavior by design, or have these suggestions made your list of fixes? Thanks. :smile:

0 Likes

#3

Ran into this again today. Put the cursor beside a close and scrolled up to find the matching open brace, but it must’ve been too far away. Curiously, Ctrl+M still works.

0 Likes