-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Editorconfig doesn't work on new files #6
Comments
Can you be a little more depicting? Also paste in the output of your Sublime console. |
Tabbing doesn't work correctly. If you have the default settings in Sublime, indent using tabs and tab size 4. And in the .editorconfig file you use the following file:
It will not override the default settings when you create a new file. It will use the sublime default settings. |
You have multiple |
Ok removed the first indent_style, but the problem still occurs for new files. Editorconfig doesn't override Preference -> Settings -Default on new files |
If you tell about |
Yes, that's correct. The settings should take effect the moment you save the file though. |
For me it doesn't work on new file even after I've saved it, but it works after I've closed the file and reopened it... |
@aripalo sorry, I was wrong, what you describe is the intended behavior. We don't want to apply settings without you being able change them back. That's why everything is applied on load (except for charset which has to be applied on save). Should probably mention this in the readme. |
Hmm... Well I'd argue that the whole point of the .editorconfig file is to enforce agreed upon code style. Therefore if user chooses to revert back to some other style, she could add an exception (pointing to the file she is editing) to the .editorconfig file before saving. What do you think? |
Maybe this is a job for the Sublime Text configuration file? |
Getting the configuration file setting would be a "victory" for me :) I'm annoyed that I need to save and then reopen the files all the time for Sublime to "pick up the code style" & our team isn't that big at the moment that I could check that everyone has the proper "on save" configuration. But even so I'd still argue that it should be "on save" by default, otherwise it's easy for another team member accidentally mess things up. Also if "on save" would be the default, it'd mean that I'd only have to make sure everyone in the team has the plugin installed without worring about their Sublime configurations. |
I’m frustrated that it doesn't add a new line to my files unless I close and re-open them. |
@OliverJAsh it does it on save. That how Sublime works: editorconfig-sublime/EditorConfig.py Line 91 in 79b466e
|
@sindresorhus If it's a new file, when you save it brings up a dialog to ask where you'd like to save. After saving, a new line is not added – if I save again, then it is added. |
I won't have time to look into this for a while, but help welcome :) |
👍 |
I have a similar problem, but my problem is that my indention style in the I wonder would it make a difference if I was working on a project? I currently just have the folder opened in Sublime, without a defined project. Thanks! 👍 |
I find that since
in a sublime-project file do apply to new files created in that project window, this should also apply for .editorconfig configured (soon-to-be-)files. |
@sindresorhus So? |
I'm using vscode editor and I meet the same issue. After I installed a plugin called 'editorconfig vs vscode', my new .editorconfig works. |
No description provided.
The text was updated successfully, but these errors were encountered: