Sublime Forum

Potential HTML Auto-Indent Issue

#1

I’m seeing an issue in Build 3129 that I wasn’t seeing prior to updating from beta build 3126. I have attached a small GIF showing the issue (which I will then describe):

Here’s the order of operations:

  1. I insert a new list item by typing li then pressing Tab to expand the tag.
  2. After typing some text, I press the Enter key to continue on the next line.
  3. As soon as I type a single character, the second line is magically indented, presumably to match the indention level from the previous line.
  4. Proceeding to the next line does not un-indent things so that all my li elements are aligned. In fact, I can keep increasing the indent as shown in the screenshot.

Note how the indent / unindent jumps around on the second line of item 2. I type the letter a, followed by a backspace, then b followed by another backspace, etc. I’m not sure if there’s a plugin at work here or not, but I know this behavior wasn’t present in the beta build.

Below are my relevant indent preferences, in case it helps. I’m seeing this in Windows, HTML syntax, tab size of 4. I also have Emmet installed, which may have a bearing on this.

  • detect_indentation: true
  • auto_indent: true
  • smart_indent: true
  • indent_to_bracket: false
  • trim_automatic_white_space: true
  • word_wrap: “auto”
  • wrap_width: 0
  • indent_subsequent_lines: true
2 Likes

#2

nice catch, and thanks for the comprehensive report - there were some recent changes to the HTML indentation rules which has likely caused this. Please can I trouble you to open an issue at https://github.com/sublimehq/Packages for it :slightly_smiling:

EDIT: I can repro without Emmet, so its definitely due to the aforementioned indentation rule tweaks. feel free to just copy paste your post here as a new issue :wink:

1 Like

#3

I’ve filed bug 915, per your request.

0 Likes