Skip to content

Tab key when indenting with spaces does not insert correct number of spaces #97780

Open

Description

  • VSCode Version: 1.45.0
  • OS Version: macOS Catalina 10.15.4

This is a re-filing of #80129 which was closed erroneously. This is NOT caused by an extension and reproduces when editing even a plain text document when extensions are all disabled.

Related to #2798.

If the insertion point is anywhere inside the indentation at the start of the line, and I press Tab, the indentation should be increased to the next full tab stop (multiple of the tab width).

I'll use the period . character instead of spaces in indentation so that it is easier to see what I'm talking about.

If I have a line of code indented by 4 spaces like this:

....do_something()

If I place the insertion point on column 2 and press tab, I get 7 spaces. That's really irritating, it means I have to be hyper precise placing my cursor when I want to indent a line, even when there's a very wide click target I should be able to hit anywhere.

.......do_something()

Xcode does this properly, it increases the indentation to 8 spaces and moves the cursor to the end of the indentation. TextMate behaves the same as Xcode.

Does this issue occur when all extensions are disabled?: Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

editor-commandsEditor text manipulation commandsfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions