Home Download Buy Blog Forum Support

Indent after autocomplete problem

Indent after autocomplete problem

Postby kabadesu on Wed Feb 29, 2012 9:40 am

I've just bought Sublime Text 2 after being a long-time Notepad++ user. Now I refuse to go back, so well done! I would like to help improve Sublime Text 2 by reporting any issues, and I have just found one.

I will check to see if I get the same issue on my PC, but am experiencing this on my Mac 10.7.3 running build 2181 (all packages disabled).

I will indicate my my cursor using the pipe |

If I type:
Code: Select all
<div|

then press tab, I get
Code: Select all
<div></div>|

Next I move my cursor between the div tags and press enter twice to get this:
Code: Select all
    <div>
|
    </div>

Next I press tab twice so I can continue to code indented nicely between the divs, but my cursor appears jumps down a line and creates tabs after the closing div, like:
Code: Select all
    <div>

    </div>    |

I have to cursor back to the line above before I can press tab to indent normally.

My apologies if this has already been reported, I couldn't think of a good search term to use for this one.
Last edited by kabadesu on Thu Mar 01, 2012 12:15 am, edited 1 time in total.
kabadesu
 
Posts: 31
Joined: Wed Feb 29, 2012 9:28 am

Re: Indent after autocomplete problem

Postby kabadesu on Wed Feb 29, 2012 10:08 am

I've just checked the 32bit version of 2181 on Windows 7 and it's happen there too.
kabadesu
 
Posts: 31
Joined: Wed Feb 29, 2012 9:28 am

Re: Indent after autocomplete problem

Postby kabadesu on Thu Mar 01, 2012 7:21 am

Also in 64bit version...

I've looked all of the settings but can't see a way to fix the problem, does anybody have any suggestions?

Is this the best place to report bugs?
kabadesu
 
Posts: 31
Joined: Wed Feb 29, 2012 9:28 am

Re: Indent after autocomplete problem

Postby atomi on Thu Mar 01, 2012 7:40 am

What is the file type you are editing?
atomi
 
Posts: 342
Joined: Thu Jan 20, 2011 5:06 pm
Location: Los Angeles CA US

Re: Indent after autocomplete problem

Postby kabadesu on Thu Mar 01, 2012 7:53 am

Just html.
kabadesu
 
Posts: 31
Joined: Wed Feb 29, 2012 9:28 am

Re: Indent after autocomplete problem

Postby jps on Thu Mar 01, 2012 11:44 am

After pressing tab after 'div', snippet fields are created - you can see this in the status bar. When snippet fields are active, pressing tab will navigate to the next snippet field, rather than inserting a literal tab. Pressing escape will cancel the snippet fields.
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm

Re: Indent after autocomplete problem

Postby kabadesu on Thu Mar 01, 2012 7:21 pm

Ah I see. After reading a bit more about snippets I see why tab would work that way.

But, as these basic autocomplete html elements have no extra fields anyway, is there a way to disable fields for certain autocompletes?
kabadesu
 
Posts: 31
Joined: Wed Feb 29, 2012 9:28 am


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 15 guests