vim-ft-bzl icon indicating copy to clipboard operation
vim-ft-bzl copied to clipboard

Avoid matching lowercase files when fname_case feature is missing

Open dbarnett opened this issue 7 years ago • 4 comments

Put the BUILD, .BUILD, and BUILD. patterns behind a has('fname_case') check so that on case-insensitive systems it doesn't false positive on lowercase names. "build" is kind of a generic pattern if it's not case-sensitive. Other patterns in vim's runtime/filetype.vim perform similar checks. See https://groups.google.com/d/topic/vim_dev/m0_mv6E63mE/discussion for context.

Users can configure an explicit autocmd in their vimrc if they want the case-insensitive match regardless.

dbarnett avatar Apr 14 '17 17:04 dbarnett

I would really rather we don't do this. At least, leave BUILD. That's the standard file name for BAZEL, even if it conflicts. If you want to guard *.BUILD or BUILD.*, ok (but I think this significantly neuters the usefulness of these).

Also, the problem here reported is that there is a shell script called build. Should this be caught by a hash-bang declaration?

artasparks avatar Apr 14 '17 20:04 artasparks

Note that since Open Source was changed (which again, I'm -1 on in its current form for the reasons above), it makes even more sense to leave this as is. If you include this plugin, you're intentionally including it, which means that you to have BUILD files detected correctly.

artasparks avatar Apr 14 '17 20:04 artasparks

I was thinking in terms of this being the upstream for Vim, but you make a good point about people including this plugin explicitly.

malcolmr avatar Apr 14 '17 20:04 malcolmr

I agree it'd be a shame and didn't realize it affected OSX, too. I'll wait and see what happens on vim/vim#1340.

Re keeping the case-insensitive behavior in this plugin, in general I'd prefer to not have standing diffs here that aren't merged into vim. If there's no workable solution for the built-in version, I guess it'd have to do, though.

dbarnett avatar Apr 15 '17 18:04 dbarnett