Sublime Forum

Indent after autocomplete problem

#1

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:

<div|

then press tab, I get

<div></div>|

Next I move my cursor between the div tags and press enter twice to get this:

    <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:

    <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.

0 Likes

#2

I’ve just checked the 32bit version of 2181 on Windows 7 and it’s happen there too.

0 Likes

#3

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?

0 Likes

#4

What is the file type you are editing?

0 Likes

#5

Just html.

0 Likes

#6

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.

0 Likes

#7

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?

0 Likes