summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2021-06-09 12:30:30 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2021-06-09 12:30:30 +0200
commit643a6d0a132c5207772f9e38bb8ceb8207bd2316 (patch)
tree311032acfe0ab59790320e583212eea27fb28d09 /scripts
parentf678aad2100068b1310ada35e3eeedddceea59e2 (diff)
downloadvim-polyglot-643a6d0a132c5207772f9e38bb8ceb8207bd2316.tar.gz
vim-polyglot-643a6d0a132c5207772f9e38bb8ceb8207bd2316.zip
De-duplicate runtime heuristic autocommands
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/build b/scripts/build
index 23bfb33c..7d278a8a 100755
--- a/scripts/build
+++ b/scripts/build
@@ -671,7 +671,7 @@ def generate_ftdetect(packages, heuristics)
for heuristic in filetype_heuristics.uniq
extensions = heuristic["extensions"].map { |e| "*.#{e}" }
- autocommands << "au BufNewFile,BufRead,BufWritePost #{extensions.join(",")} call polyglot#detect##{camelize(heuristic["extensions"].first)}()"
+ autocommands << "au! BufNewFile,BufRead,BufWritePost #{extensions.join(",")} call polyglot#detect##{camelize(heuristic["extensions"].first)}()"
end
if autocommands.size > 0 && filetype["description"]