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
PR #36 rebound fuzzy-find from Ctrl+P (native command-line history)
to ,ff, but four user-facing sites still told people to press Ctrl+P:
- install.sh interactive menu (ripgrep description, fzf description)
- QUICKSTART.md "Find things" block
- .github/demo.tape (the script that regenerates the README hero GIF)
Three text fixes; the .tape update keeps a future regenerate honest.
The binary .github/demo.gif still shows Ctrl+P — regenerating it
requires the original /tmp/demo-project fixture which isn't in repo,
so that's left for a follow-up.
Closes#79
* 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)
Two small first-run UX fixes bundled together (both touch install.sh
and README, with the same review surface):
1. README badge and install.sh warn line bumped 8.0+ → 8.1+. The
runtime conditionally relies on patches 8.1.0360 (diffopt) and
8.1.1517 (completeopt+=popup). Guards no-op on 8.0 but the docs
were silently misleading anyone debugging on stale Vim.
2. "First steps inside Vim" block reordered so ,? leads. The cheat
sheet is the most useful onboarding asset; it shouldn't be buried
below three "how to leave" hints. Also promoted ,x above :q!
since the latter is emergency, not first-run.
Closes#76Closes#77
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
The previous fallback chain (pip3 install → pip3 install
--break-system-packages) silently writes into the distro Python's
site-packages on PEP 668 systems (Debian 12+, Ubuntu 23.04+). The warn
message fires after the damage is done. Since the target audience is
engineers SSH-ing into Linux servers, the PEP 668 hit rate is high.
New order:
1. pipx install (isolated per-tool venvs)
2. pip3 --user (works on pre-PEP-668 Python)
3. --break-system-packages (gated behind CHOPSTICKS_ALLOW_BREAK_SYSTEM=1)
4. fail with a remediation hint
Also:
- Bootstrap pipx via the system package manager if it's missing.
- Warn if $HOME/.local/bin is absent from PATH (pipx and pip --user
both install there).
Closes#66
Previously install.sh ran `_vim_run 'PlugClean!'` unconditionally before
PlugInstall. PlugClean with bang removes any directory under
~/.vim/plugged not declared in the active profile's g:plugs, without
confirmation — silently nuking plugins a user has manually cloned to try
out, plus leftovers from older profile config (Goyo, Limelight, etc.).
Replace with a `list_extra_plugins` helper that runs a Vim subprocess
with all opt-in flags forced on and `$TMUX = '1'`, so the declared set
covers every plugin any chopsticks profile/flag combination could
register. Conditional plugins (vim-tmux-navigator, auto-pairs) are
therefore never flagged as extras.
When extras are detected:
- interactive: list them, ask before running PlugClean!
- --yes: leave in place, instruct the user to run :PlugClean manually
- otherwise (no extras): skip PlugClean entirely (saves an 80ms Vim
launch on the common case)
Closes#64
`,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
The original rule was easy to misread as "no npm tools anywhere",
which conflicts with install.sh installing prettier/eslint/etc. The
real boundary is the Vim runtime: no coc.nvim or Node-backed
completion engines. External CLIs that ALE shells out to are fine.
Update the README pointer line to match.
Closes#70
Show all listed buffers in a tabline (current bufnr highlighted, modified
marker '+'), and reserve a permanent signcolumn so width doesn't jitter when
gitgutter/ALE/LSP signs come and go.
- ui.vim: TLBuild() + TabLine{,Sel,Fill} hl groups via ColorScheme autocmd;
set signcolumn=yes for non-TTY (overrides core.vim's previous logic)
- core.vim: drop non-TTY signcolumn branch (centralized in ui.vim)
The full-column ColorColumn was visually overwhelming on every line, especially
with default vim's LightRed (kicked in silently when solarized8 wasn't installed).
Replace it with an OverLength match that only highlights characters past the
buffer's textwidth.
- editing.vim: OverLength matchadd, refreshed on FileType/BufWinEnter/OptionSet
- languages.vim: drop colorcolumn from per-filetype autocmds (textwidth still set)
- ui.vim: VertSplit/CursorLine/CursorLineNr/SignColumn override via ColorScheme
autocmd; fillchars for vert and eob; timer-based warning if solarized8 missing
Scenes: open → fuzzy find → ripgrep → curl running API (JSON) → cheat sheet.
Server runs in background, curl shows formatted /users response.
Fixed: port conflict, buffer state reset before cheat sheet.
5-scene story: open → fuzzy find → ripgrep → run file → cheat sheet.
Demo project rewritten with functional dispatch (no class/stdlib method
name lint issues). All frames clean — no ALE warnings, no git markers.