Home Download Buy Blog Forum Support

html autocompletion two elements

html autocompletion two elements

Postby allaire on Sat Apr 30, 2011 7:03 pm

Is it just me, or when I do p+tab (autocomplete) it puts my cursor between them, but then, if I try to autocomplete anything else between this, it does not work, the tab just puts my cursor at the end of the closing tag. If you want to try, type <p><a href="#"></a></p> only with the autocompletion, so 'p+tab' and 'a+tab'

Any ideas about this? I'm on 2059 on Mac OSX

Thanks!
allaire
 
Posts: 15
Joined: Mon Apr 11, 2011 6:44 pm

Re: html autocompletion two elements

Postby pflynny on Mon May 02, 2011 7:13 am

You just need to have a space before the closing paragraph tag, like this;

Code: Select all
<p>a </p>


If you hit a+tab in there it will auto complete.
pflynny
 
Posts: 5
Joined: Sun May 01, 2011 11:24 am

Re: html autocompletion two elements

Postby allaire on Mon May 02, 2011 3:16 pm

Does not work, and the extra task of hitting space, then left arrow, and then tab is a bit too long anyway no?
allaire
 
Posts: 15
Joined: Mon Apr 11, 2011 6:44 pm

Re: html autocompletion two elements

Postby qqq on Mon May 02, 2011 8:45 pm

Of course it's too long. Maybe it's not a priority now but shouldn't look like this in the release version. Chaining is supported by most of rival editors.
ST2 Win7 64-bit
qqq
 
Posts: 57
Joined: Tue Mar 08, 2011 9:49 am

Re: html autocompletion two elements

Postby allaire on Thu Jun 30, 2011 4:45 pm

Any updates on this Jon or any admins? I'm running the latest dev build, always hoping it gets fixed :)

Perhaps, nice job so far on Sublime text 2, really doing a good job.
allaire
 
Posts: 15
Joined: Mon Apr 11, 2011 6:44 pm

Re: html autocompletion two elements

Postby jps on Thu Jun 30, 2011 11:52 pm

When a snippet is active, pressing tab will jump to the next snippet field, in preference to inserting a new snippet using the text at the cursor. In the situation you're describing, a snippet is active - you can see this by the "Field 1 of 2" text in the status bar.

You can:
- Press escape to indicate you're finished with the current sinpet
- Use ctrl+space to insert the completion, which will work irrespective of if a snippet is active
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: html autocompletion two elements

Postby allaire on Fri Jul 01, 2011 3:00 am

Thank you @jps, it makes sense, did not know about the escape trick!

Now, is it just me or the dev 2074 is broken? When I tab 2 times de tab key, it inserts the snippet that is at the top of my list and then it sticks to it :o in my case <a href="#"></a>

I'm on mac btw
allaire
 
Posts: 15
Joined: Mon Apr 11, 2011 6:44 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 21 guests