Home Download Buy Blog Forum Support

Tabstops broken in HTML editor

Tabstops broken in HTML editor

Postby greghines on Wed Mar 03, 2010 10:48 pm

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

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: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
  "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>Example</title>
  </head>
  <body>
   
  </body>
</html>


Now enter the following keystrokes:

Code: Select all
<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: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
  "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>Example</title>
  </head>
  <body>
    <div id="some-id">
    </div>
    |
  </body>
</html>


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.
greghines
 
Posts: 1
Joined: Wed Mar 03, 2010 10:22 pm

Re: Tabstops broken in HTML editor

Postby gpfsmurf on Wed Mar 03, 2010 11:48 pm

I have the same problem, it's probably caused by a plugin
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm


Return to Technical Support

Who is online

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