Home Download Buy Blog Forum Support

html snippets bug (?)

html snippets bug (?)

Postby sc0rp10 on Thu Oct 13, 2011 8:09 pm

Hi.
I'm sorry, I rarely come on this forum.
I have question about tab-completion in html-files.
I type:
Code: Select all
div

and press tab
my code are expand to:
Code: Select all
<div></div>

and cursor into the tag.
that's ok
next, im typing
Code: Select all
span

and my code looks like
Code: Select all
<div>span</div>

and i press tab
i found this:
Code: Select all
<div>span</div>|

but i'm expect this:
Code: Select all
<div><span></span></div>

anyone can help me with fixing this ugly problem?
thx
sorry for bad english
sc0rp10
 
Posts: 11
Joined: Fri Oct 01, 2010 2:27 pm

Re: html snippets bug (?)

Postby C0D312 on Thu Oct 13, 2011 8:27 pm

Hi. While I personally can't reproduce this bug, my version works as expected... (not sure why. Maybe I have some different settings or because I'm using the dev version), I can offer a suggestion. When you expand a snippet such as "div," the snippet has different fields. If you look at the status bar after expanding a snippet, in the left corner it says Field 1 or 2, or something like that. This means that pressing tab will move the cursor to the next field. If you are attempting to expand a snippet, you could try pressing control + space to expand the snippet instead of tab. Control + space is only bound to autocomplete so it won't attempt to move to the next field. I hope this helps.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: html snippets bug (?)

Postby sc0rp10 on Thu Oct 13, 2011 8:38 pm

hmmm, i'm using default settings. and when i press tab in the status bar i see "field 1 of 2". what its meaning?
sc0rp10
 
Posts: 11
Joined: Fri Oct 01, 2010 2:27 pm

Re: html snippets bug (?)

Postby matias1 on Thu Oct 13, 2011 9:33 pm

same problem for me. html package is a bit buggy.
matias1
 
Posts: 7
Joined: Thu Oct 13, 2011 3:43 am

Re: html snippets bug (?)

Postby sc0rp10 on Mon Oct 17, 2011 8:20 pm

anyone have ideas?
sc0rp10
 
Posts: 11
Joined: Fri Oct 01, 2010 2:27 pm

Re: html snippets bug (?)

Postby MrMartineau on Mon Oct 17, 2011 9:04 pm

I have the same problem too & am frequently frustrated when it occurs. What is also annoying, is when a snippet is tabtriggered from within another snippet. for example:
Code: Select all
<div id="" class="">
   
</div><!-- / -->


if the caret is just after 'id' & I hit tab, it inserts another
Code: Select all
id=""
making this
Code: Select all
<div id=""="" class="">
   
</div><!-- / -->


I don't know if its a ST2 bug mixed with a ZenCoding thing or not, but I thought I would raise it here too
@MrMartineau || Setup Sublime Text quickly: Find out all you need at https://github.com/mrmartineau/SublimeTextSetup
MrMartineau
 
Posts: 78
Joined: Thu Jul 28, 2011 8:35 am


Return to Technical Support

Who is online

Users browsing this forum: estmatic, Google [Bot] and 31 guests