question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Defaults for files without an .editorconfig file

See original GitHub issue

Editorconfig seems to be overriding my user preferences for new files with no .editorconfig file. In my Sublime preferences, I have

"tab_size": 2,
"translate_tabs_to_spaces": true

and yet new files start out with 4 spaces set as their default.

Is there any way to set this default within Editorconfig? I don’t see any preferences under Preferences -> Package Settings.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
luwescommented, Aug 25, 2018

Experienced this issue too multiple times. If there is no .editorconfig file the plugin should indeed do nothing.

Seems to be caused by an .editorconfig file in your user folder ~/.editorconfig. If that is removed, it works like expected.

1reaction
kevinsaltercommented, Jan 3, 2015

+1

When this EditorConfig plugin is active, it overrides Sublime’s indentation auto-detection with its own defaults in the absence of an .editorconfig file. The screenshot below shows what happens when a file is selected in the sidebar and then opened in preview mode. You can see that Sublime is correctly trying to set the indentation to 4 spaces (arrow on the left), but is overridden (arrow on the right). Uninstalling the plugin restores Sublime’s proper auto-indentation detection and settings.

indentation-error

Read more comments on GitHub >

github_iconTop Results From Across the Web

EditorConfig settings - Visual Studio (Windows)
Add and remove EditorConfig files ; (Edit > ; Advanced > ; Format Document or ; Ctrl+K, ; Ctrl+D), the white-space settings in...
Read more >
Support for "treat as with extension" for files without ...
A common issue with files without extension (and with no specific filename) is that they cannot have a default editor (at least without...
Read more >
EditorConfig
EditorConfig is a file format and collection of text editor plugins for maintaining consistent coding styles between different editors and IDEs.
Read more >
How to specify a default .editorconfig file that should be ...
Go to Vscode settings; In search form input @ext:EditorConfig.EditorConfig; Uncheck Generate Auto; In field Template input path for your own ...
Read more >
Why You Should Use EditorConfig to Standardize Code ...
The user's style settings get applied to the files they modify. ... are no standard conventions for how to write an .editorconfig file, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found