Sublime Forum

Caret scope different depending on line indentation in HTML

#1

With document like this:

[code]

whatever [/code]

when caret is between opening and closing “object” tags, ST2 shows “meta.scope.between-tag-pair.html” scope on pressing “cmd+alt+p” while it does not show this scope when caret is between “style” tags. If I unindent style tag then, with caret still between start and end tag, above-mentioned scope is reported.

This breaks zencoding keyboard shortcuts that depend on this scope to nicely indent caret on pressing enter.

0 Likes

#2

I’m still experiencing this, and I thought this might be kind of related to a little imperfection I’ve found:

Assuming to be using tabs to indent the code, and given the HTML in the previous post of this thread, if I place the caret just after and I press Enter, a new line is added but it’s not automatically indented (to match the indentation of other children of the element), and the caret is placed at the beginning of the line.

This generally happens when the element you’re in is not completely empty. Could this please be fixed? It’s not a big change, and Sublime Text is already great as it is, but by setting the auto indent option to true this behaviour is expected, plus I’m used to it coming from TextMate :stuck_out_tongue:

0 Likes

#3

Annoying bug. If that is a bug and not intended for some reason.

0 Likes