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
* Bump ttimeoutlen to 50ms on SSH/TTY
ttimeoutlen=10 fragments multi-byte key codes (F-keys, arrows, Alt-
prefixes) when one-way latency exceeds 10ms, which is normal on SSH.
Vim then sees ESC followed by a literal letter and either returns to
Normal mode mid-insert or treats the trailing byte as a separate
keypress (so <F4> inserts "4").
50ms is the standard "slow link" value: well below perceptible <Esc>
delay locally and big enough for typical residential/long-haul SSH.
g:is_tty already gates several other terminal accommodations; reuse
it here.
Closes#74
* Pin TERM in ttimeoutlen test (env-hermetic)
Four `vim -u NONE` invocations in scripts/test.sh set a profile or
option as their first `-c` then `source .vimrc`. They didn't override
XDG_CONFIG_HOME, so .vimrc's local-config hook read
~/.config/chopsticks.vim and any `let g:chopsticks_profile = '...'`
there silently overrode the test's setup.
After install.sh runs (writing `engineer` or `full` to that file),
scripts/test.sh vim fails on the developer's machine but passes in
CI — CI never runs install.sh.
Fix by prepending XDG_CONFIG_HOME="\$EMPTY_XDG" to the four bare sites,
matching what the surrounding tests already do. L176 stays unchanged
because it explicitly sets g:chopsticks_local_config to its own
controlled file.
Closes#72
`,F` in normal mode mapped `gg=G\`\`` — reindent the entire file with
no confirmation. A muscle-typo of `,F` instead of `,f` (LSP format)
rewrites the whole buffer, and `=` does not always produce sensible
indentation for languages where Vim's internal indent expression is
poor.
Gate the normal-mode binding behind `g:chopsticks_enable_reindent_file`
(default off). The visual-mode binding (`vnoremap <leader>F =`) is
bounded by the user's selection and stays as default.
README's all-keybindings table now marks `,F re-indent (v)` to reflect
the visual-only default.
Closes#68
`set exrc` causes Vim to source `.vimrc`/`.exrc` from the current
working directory, which is a wider blast radius than the default
should accept for a config aimed at SSH/shared-host workflows.
`set secure` mitigates the most dangerous behaviors but still allows
arbitrary buffer state changes from an untrusted CWD.
Gate both behind `g:chopsticks_enable_exrc` (default off), following the
existing opt-in convention used for jk escape, Ctrl-S save, auto-pairs,
terminal keymaps, and completion keymaps.
Closes#62