Sublime Forum

Misplaced indentation guides

#1

Hi,

I just wanna ask if something similar happens to some of you too and
if you are aware of possible solution. Here is a screen of the problem:

So this happens regardless of theme / color scheme in *.scss files
for deep indented lines - an active guide (right most vertical line)
is misplaced and probably shouldn’t even be there.

My guide settings looks like this:

"indent_guide_options": [ "draw_normal", "draw_active" ],

and I’m using two spaces for indent.

0 Likes

#2

Which is your so-called right most vertical line? The blue, green or red?

Do you mean the problematic indent guide should not exist?


It looks like that the indent guide is just simply drawn every 2 spaces. I think it’s reasonable though.

0 Likes

#3

The red one.

Yes. Have a look at bigger code fragment:

In case of clsShCircle indentation is fine - there is no vertical line connecting curly bracket at 42. and 50. line. I tried adding more properties to clsShCircle and removed &:after selector completely to see if indentation behavior changes - but it does not.

In the image you posted there is no line touching first ‘s’ of ‘sss’. In my case there is one, and I’m pretty sure it shouldn’t be there.

Also, changing font size from 10pt to 9pt solves the issue, but 9pt is to small for my liking:

10pt:

9pt:

0 Likes

#4

Ahh, I see. The red one is correct but ST now shows the green one.



You may try BracketHighlighter with following plugin settings which gives the screenshot above.

    // Experimental: Creates a visible bar at the beginning of all lines between
    // multiline bracket spans.
    "content_highlight_bar": true,
    // Experimental: Align the content highlight bar at the bracket indent level
    "align_content_highlight_bar": true,

And disable ST’s bracket matching in user preferences:

    // diable ST's bracket matching
    "match_brackets": false,
    "match_tags": false,
0 Likes

#5

I think we do not understand each other :wink:

If you take a closer look:

When my font size is 10pt there is a guide that touches letter ‘b’ in background-color and box-shadow properties. It shouldn’t be there in my opinion. If I change the font size to 9pt it doesn’t show anymore:

Also it happens in JavaScript files, but as in case of Sass files after 6th indentation level if I’m counting correctly :wink:

0 Likes

#6

Sorry for my misunderstanding. It looks like a rendering problem… nothing I can help here.


I think what I mentioned is another problem.

0 Likes

#7

No worries, thanks for trying to help :slightly_smiling:

0 Likes

#8

@sowizz I’ve had the some problem. In my case it’s in Ruby files (.rb). I’ve messed around with a lot of my settings and all that seems to matter is font_face and font_size.

For instance if I use Source Code Pro as the typeface it renders the guides correctly at 16 and 20, but incorrectly at 17–19 (and it even renders them in different incorrect ways at 17 vs. 18–19).

If I switch to PT Mono I get the same behavior as with Source Code Pro

If I use the default font on OS X, which is Menlo, or several other mono fonts in OS X, then it actually seems to render them correctly at all sizes.

0 Likes

Indentation guides break with one specific font
#9

Also see Indentation guides break with one specific font

I ended up marking a solution, but I’m going to undo that since it didn’t really turn out to be true.

1 Like