Sublime Forum

Tabstops broken in HTML editor

#1

EDIT: Erm, please feel free to ignore/delete this. I deleted the Sublime Text folder in my AppData/Roaming folder and the problem disappeared. I’m back to loving every bit of Sublime. :smile:

I’m using a stock configuration of Sublime Text 1.3 on Windows 7 Home Premium x64, with only a few settings changed. And I’m encountering a really frustrating issue with tabstops when editing in HTML mode. To replicate this behavior:

Create a new file, set it to HTML, and paste the following:

[code]

Example [/code]

Now enter the following keystrokes:

<div id=some-id{end}{enter}</div{end}{enter}

That will result in the following document, with the cursor sitting on the line after the closing div tag (indicated here by a pipe character):

[code]

Example
| [/code]

Now hit the tab key. The expectation is that two spaces will be added (as another level of indentation) so that it’ll be at line 10, column 7. But what ACTUALLY happens is that the cursor goes between the " and > characters of the opening div tag (line 8, column 22).

This behavior is consistent. No matter where the cursor is, hitting tab will always make the cursor go to first tabstop that was ignored (not in line order, mind you, but in the order the markup was typed in). You can be 100 lines away, editing another part of the document and you’ll be yanked back to the first tabstop you ignored since you started editing the file. It also doesn’t matter if you’ve highlighted several lines to indent them, it’ll still place the cursor where it wants (without actually indenting the selected text).

It’s quite common to indent things when creating HTML, obviously, and this bug means that unless you remember to hit every tabstop without fail, indentation is a massive frustration because the cursor goes to a seemingly random location every time you try to indent something.

0 Likes

#2

I have the same problem, it’s probably caused by a plugin

0 Likes