Skip to content

insertSpaces = auto, new file, first indentation, tab not possible. #1747

@MicahZoltu

Description

@MicahZoltu

When insertSpaces = auto is set and you create a new file, pressing the tab key will insert spaces rather than a tab character. This is a problematic default because it means there is no easy way to actually get the first tab into the file so the auto can start learning what the file's indentation mechanism is. If you want space indent, you can simply press the space bar a few times to start the learning process. In order to start a new file with tab indentation though you (currently) need to go find another file with a tab in it, copy the tab, and paste it into the new file.

I recommend having the fallback behavior for an empty file be that the space bar inserts spaces and the tab key inserts tabs. This way both camps (spaces and tabs) have the ability to reasonably start new files when in auto-mode.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions