chopsticks/scripts
m1ngsama 7f7a200b85
Fix built-in plugin guards for old-style runtime plugins (#82)
env.vim sets g:loaded_X for twelve built-in plugins to short-circuit
them. A prior fix corrected the casing on g:loaded_logiPat, but four
of those plugins actually check the unscoped loaded_X form, not
g:loaded_X — so those four guards have been doing nothing.

Affected (all old runtime plugins predating the g:loaded_ convention):

- gzip.vim       checks `loaded_gzip`
- logiPat.vim    checks `loaded_logiPat`
- rrhelper.vim   checks `loaded_rrhelper`
- spellfile.vim  checks `loaded_spellfile_plugin`

Set both forms (g: and unscoped) for those four — belt and
suspenders. Empirically saves ~270μs at startup, mostly from gzip
which was loading its full autocmd group on every launch.

Add a regression assertion: source .vimrc, verify the four unscoped
guards exist.

Closes #81
2026-05-17 14:08:20 +08:00
..
test.sh Fix built-in plugin guards for old-style runtime plugins (#82) 2026-05-17 14:08:20 +08:00