Merge pull request #293 from CH-DanReif/disable_individual_ftdetect

Allow disabling individual ftdetects via `g:polyglot_disabled`
This commit is contained in:
CH-DanReif 2018-04-30 11:19:20 -07:00 committed by GitHub
commit fb8c5fa8e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

18
build
View File

@ -59,14 +59,16 @@ extract() {
continue
fi
for f in ${dir}/ftdetect/*; do
(
echo "augroup filetypedetect";
echo '" '"$pack";
cat "${f}";
echo "augroup END";
echo
) >> tmp/polyglot.vim;
for f in "${dir}/ftdetect/"*; do
cat <<EOF >> tmp/polyglot.vim
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '${pack%%:*}') == -1
augroup filetypedetect
" ${pack%%:*}, from ${f##*/ftdetect/} in ${pack#*:}
$(cat "${f}")
augroup end
endif
EOF
done
done