Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rgov opened this issue May 14, 2020 · 1 comment
Open
Assignees
Labels
editor-commands Editor text manipulation commands feature-request Request for new features or functionality
Milestone

Comments

@rgov
Copy link

rgov commented May 14, 2020

  • 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

@rgov
Copy link
Author

rgov commented May 14, 2020

I do have editor.useTabStops enabled but I don't understand what it does if not this.

@alexdima alexdima self-assigned this May 15, 2020
@alexdima alexdima added this to the Backlog milestone Nov 11, 2020
@alexdima alexdima added editor-commands Editor text manipulation commands feature-request Request for new features or functionality labels Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-commands Editor text manipulation commands feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants