shmunna / zen-coding

Automatically exported from code.google.com/p/zen-coding
0 stars 0 forks source link

Expanding in Sublime Text 2 doesn't work immediately after another expand #336

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Example: create a ul (with no children) and expand it with TAB
2. in the created "<ul></ul>", create an li element like so "<ul>li</ul>" and 
hit TAB
3. The cursor moves to the end of the line without expanding
4. putting the cursor back and hitting TAB after that does expand, so it only 
happens right after another expand.

What is the expected output? What do you see instead?
Expected: expanding of the li element
Result: cursor jumps to end-of-line without expanding

What version of the product are you using? On what operating system?
Sublime Text 2, build 2181
Tested on Windows Vista & Windows 7

Please provide any additional information below.
I think no more info is needed at this time.

Original issue reported on code.google.com by rp.ka...@gmail.com on 3 May 2012 at 2:52

GoogleCodeExporter commented 8 years ago
This behavior is correct: expanded abbreviation contains number of tabstop so 
you can quickly traverse between them with Tab key. Try more complex 
abbreviation, like `div[title class]` and see how Tab key traverses between 
empty attributes and node content.

To exit tabstop mode, you should press Esc key.

Original comment by serge....@gmail.com on 4 Jul 2012 at 8:34

GoogleCodeExporter commented 8 years ago
I know how the tabstops work, but in case there are none, why should I press 
ESC first?
In case of the ul example, there's simply nothing to traverse anyway, 
especially considering I already added content by typing again ("li"), which 
(in case of 0 tabstops) should have reset this behaviour anyway.

I totally agree for elements that need the tabstops, but in case there are none 
it would be really efficient to expand on the next TAB.

Original comment by rp.ka...@gmail.com on 4 Jul 2012 at 8:40