Home Download Buy Blog Forum Support

Caret scope different depending on line indentation in HTML

Caret scope different depending on line indentation in HTML

Postby rchl on Sat Aug 27, 2011 12:26 pm

With document like this:

Code: Select all
<!DOCTYPE html>
<html>
<head>
  <title>whatever</title>
</head>
<body>
  <object></object>
  <style></style>
</body>
</html>


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.
rchl
 
Posts: 148
Joined: Fri Mar 04, 2011 11:02 pm

Re: Caret scope different depending on line indentation in HTML

Postby andre_g on Wed Aug 31, 2011 11:04 pm

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 <body> and I press Enter, a new line is added but it's not automatically indented (to match the indentation of other children of the <body> 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 :P
andre_g
 
Posts: 7
Joined: Wed Aug 31, 2011 5:56 pm

Re: Caret scope different depending on line indentation in HTML

Postby rchl on Sat Oct 01, 2011 2:04 pm

Annoying bug. If that is a bug and not intended for some reason.
rchl
 
Posts: 148
Joined: Fri Mar 04, 2011 11:02 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 34 guests