-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Change the editor fallback defaults to insertSpaces: true, tabSize: 4 #498
Comments
Our project settings force the insertion of tabs:
|
Should this only act on when there is no definite hint about the file's indentation? E.g.: new files. |
The settings get applied by the workbench to each editor regardless the model being for an empty file or not. If this setting is left out, then the model is used for guessing. If the guessing code is not confident, it falls back to insertSpaces:false, tabSize:4. The fallback values have no configuration story. I think our intent here is to say: "all TypeScript, CSS and JS files should use tabs". This sounds to me as a great usecase for .editorconfig |
Is there any mode specific configuration instead? YAML actually banned tabs, so our editor putting one in there is just wrong. That is true for our project as it is for every user out there writing YAML. |
I've run into this too, I want the behavior of |
For those wondering, Atom also falls back, but to spaces. |
I'm ok with changing the fallback values, I especially like the reasoning that all compilers support spaces. So the action out of this issue is to change the fallback defaults to |
I don't have a preference setting about spaces vs tabs. When I open
.travis.yml
, VSCode always uses tabs instead of spaces to create new indentation. This is very problematic since YAML files forbid tabs.I thought the editor would automatically figure out the indentation to use?
The text was updated successfully, but these errors were encountered: