editorconfig / editorconfig-vim

EditorConfig plugin for Vim
http://editorconfig.org
Other
3.13k stars 137 forks source link

`**/b/*.txt` does not match `b/c.txt` #239

Open divVerent opened 4 months ago

divVerent commented 4 months ago

I built the following structure:

cd /tmp
mkdir -p a/b
cat > a/.editorconfig <<EOF
[**/b/**.txt]
indent_size = 42
tab_width = 7
EOF
cd a/b
touch c.txt

The editorconfig command line tool applies the settings:

$ editorconfig $PWD/c.txt
indent_size=42
tab_width=7

However, editorconfig-vim does not interpret this:

$ vim c.txt
:set sw? ts?
shiftwidth=8 tabstop=8

If the .editorconfig had a [b/**.txt] section instead, it'll work.

I have not tracked this down further, as it has an effective workaround for me. Nevertheless, logging this bug anyway. I do wonder if this is related to the use of l:config_dirname that I also found in issue #238 - it seems there's simply a difference in how ** is interpreted in section names.