I've just fixed a small problem regarding to the use of aug[roup] in ftdetct.
It seems that that's already surrounded by an internal group by default, then if we define a new group for those au[cmd](s) in ftdetct, that causes a problem at filetype detection in other subsequent plugins.
There are similar fixes also in other vim plugins:
In my case, when I open a Racket file (xxx.rkt), the use of aug[roup] here causes an error like below (maybe racket is the next to purescript in my loaded vim plugins, in alphabetical order?):
Error detected while processing BufRead Autocommands for "*.rkt"..function RacketDetectHashLang[3]..FileType Autocommands for "*".
.function <SNR>21_LoadFTPlugin:
line 3:
E31: No such mapping
This is related to wlangstroth/vim-racket. The error message itself is unfortunately not so helpful, but the Vim doc of :ftdetct mentions like so:
Note that there is no "augroup" command, this has already been done
when sourcing your file.
We usally need to surround au[tocmd]s with an aug[roup], but likely don't need so in the ftdetct directory.
UPDATED
Apparently, it seems that the reason of the above error is that the use of aug[roup] here causes unexpected unloading of another plugin. In the case on my env (for vim-racket), this part (b:undo_ftplugin) is evaluated.
Changes
Thus, this pull request simply removes an unnecessary aug[roup] in ftdetct, and adds a comment to ignore Vint's rule ProhibitAutocmdWithNoGroup here.
I hope that makes sense!
Checklist:
[x] Briefly described the change
[ ] Opened an issue before investing a significant amount of work into changes
[ ] Updated README.md with any new configuration options and behavior
[x] Updated CHANGELOG.md with the proposed changes
[ ] Ran generate-doc.sh to re-generate the documentation
Overview
I've just fixed a small problem regarding to the use of
aug[roup]
in ftdetct.It seems that that's already surrounded by an internal group by default, then if we define a new group for those
au[cmd]
(s) in ftdetct, that causes a problem at filetype detection in other subsequent plugins.There are similar fixes also in other vim plugins:
And addition to that, there is an issue related to this topic, for Vint:
Problem
In my case, when I open a Racket file (
xxx.rkt
), the use ofaug[roup]
here causes an error like below (maybe racket is the next to purescript in my loaded vim plugins, in alphabetical order?):This is related to wlangstroth/vim-racket. The error message itself is unfortunately not so helpful, but the Vim doc of :ftdetct mentions like so:
We usally need to surround
au[tocmd]s
with anaug[roup]
, but likely don't need so in theftdetct
directory.UPDATED Apparently, it seems that the reason of the above error is that the use of
aug[roup]
here causes unexpected unloading of another plugin. In the case on my env (for vim-racket), this part (b:undo_ftplugin
) is evaluated.Changes
Thus, this pull request simply removes an unnecessary aug[roup] in ftdetct, and adds a comment to ignore Vint's rule
ProhibitAutocmdWithNoGroup
here.I hope that makes sense!
Checklist:
generate-doc.sh
to re-generate the documentation