sindresorhus / editorconfig-sublime

Sublime Text plugin for EditorConfig - Helps developers maintain consistent coding styles between different editors
MIT License
1.77k stars 108 forks source link

Multiple string matching + wildcards failing #39

Closed tillig closed 9 years ago

tillig commented 9 years ago

I have an editorconfig that tries to make use of the multiple-string matching to keep things simple, but also wildcards:

[*]
end_of_line = CRLF
indent_style = tab

[{*.html,*.cshtml}]
indent_style = space
indent_size = 4

This seems to work in the Visual Studio plugin but not in Sublime Text 3 (registered).

When I open a .html file and look in the Sublime console I see the dictionary of settings and it only includes the ones from the [*] match.

However, if I change the file to:

[*]
end_of_line = CRLF
indent_style = tab

[*.cshtml]
indent_style = space
indent_size = 4

[*.html]
indent_style = space
indent_size = 4

Then my settings are correctly applied in both Sublime and Visual Studio.

Am I misusing the multi-string match function?

sindresorhus commented 9 years ago

@treyhunner

mrhyde commented 9 years ago

Have exactly the same issue here. :sob:

ArmorDarks commented 9 years ago

Same issue too. Sublime build 3065

treyhunner commented 9 years ago

This is a problem with the Python core library not supporting nesting of special glob characters(*, ?, etc.) in braces ({ and }).

The incomplete pull request for adding support is at editorconfig/editorconfig-core-py#5. I started adding support and got stuck and then busy.

treyhunner commented 9 years ago

I just released v0.12.0 of the EditorConfig Python library which supports nested brace expansion and numeric ranges.

@sindresorhus if you upgrade the Python library it will fix this issue.