Commit graph

116 commits

Author SHA1 Message Date
5156543702
Bump Vim version docs to 8.1+ and lead onboarding with ,? (#78)
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 #76
Closes #77
2026-05-17 11:00:03 +08:00
74cc479a0e
Insulate vim smoke tests from a user's local chopsticks.vim (#73)
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
2026-05-17 09:39:12 +08:00
debcdd33c4
Prefer pipx over pip3 --break-system-packages for Python tools (#67)
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
2026-05-17 08:42:52 +08:00
d6df4fee3e
Make PlugClean interactive in install.sh (#65)
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
2026-05-17 08:38:35 +08:00
002bc7bd3e
Make ,F full-file reindent opt-in (#69)
Some checks are pending
test / startup (macos-latest) (push) Waiting to run
test / startup (ubuntu-latest) (push) Waiting to run
test / shellcheck (push) Waiting to run
test / docs (push) Waiting to run
`,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
2026-05-16 23:08:26 +08:00
fc872918a1
Make project-local exrc opt-in (#63)
`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
2026-05-16 23:00:44 +08:00
8a36b41d66
Clarify the "no Node.js dependencies" rule (#71)
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
2026-05-16 22:59:40 +08:00
8e6dcc6e97
Fix opt-in keymap install messaging (#61)
Some checks failed
test / startup (macos-latest) (push) Has been cancelled
test / startup (ubuntu-latest) (push) Has been cancelled
test / shellcheck (push) Has been cancelled
test / docs (push) Has been cancelled
2026-05-13 18:28:31 +08:00
2514d2e803
Fix noninteractive plugin installation (#59) 2026-05-13 18:22:12 +08:00
b2835d3cae
Make terminal keymaps opt-in (#57) 2026-05-13 17:24:45 +08:00
23f6ed98ec
Make auto-pairs opt-in (#55) 2026-05-13 17:18:01 +08:00
043e8e4a58
Make completion keymaps opt-in (#53) 2026-05-13 17:08:21 +08:00
8f89939a57
Make sudo-save mapping opt-in (#51) 2026-05-13 15:47:59 +08:00
ea8c3054e1
Move visual selection search to leader mapping (#49) 2026-05-13 15:01:45 +08:00
2aa28304ca
Restore command-line Ctrl-P and Ctrl-N (#47) 2026-05-13 14:50:27 +08:00
ff0de570de
Move last-change selection to leader mapping (#45) 2026-05-13 14:44:58 +08:00
fd081a2397
Make Ctrl-S save opt-in (#42)
* Make Ctrl-S save opt in

* Avoid hanging CI Vim installation

* Keep Homebrew Vim on macOS CI
2026-05-13 14:32:50 +08:00
76aa3efd72
Make jk escape opt in (#40) 2026-05-13 14:05:22 +08:00
f278e9f3b6
Restore native Ctrl window keys (#38) 2026-05-13 13:56:28 +08:00
d03f7129d8
Move file search to leader mapping (#36) 2026-05-13 13:50:27 +08:00
e1c2ea3888
Restore native Space motion behavior (#34) 2026-05-13 13:39:59 +08:00
861e18b86c
Restore native Q behavior (#32) 2026-05-13 13:32:35 +08:00
8e2505bfca
Restore native Y yank behavior (#30) 2026-05-13 13:28:21 +08:00
49aae12415
Restore native zero motion (#28) 2026-05-13 13:24:04 +08:00
2f7d488c8c
Move LSP navigation to native-first mappings (#26) 2026-05-13 13:18:08 +08:00
5544b74545
Improve first-time LSP setup guidance (#25) 2026-05-13 12:45:53 +08:00
c98d04200c
Document native-first keymap policy (#23) 2026-05-13 12:39:40 +08:00
9fde301a2c
Use temp output for C file runner (#21) 2026-05-13 12:39:08 +08:00
097c8abcd7
Report LSP status without autoload false negatives (#20) 2026-05-13 12:38:32 +08:00
1c54077487
Make bootstrap dry-run avoid git installation (#19) 2026-05-13 12:37:46 +08:00
259744b5e3 Improve test runner discoverability
Some checks failed
test / startup (macos-latest) (push) Has been cancelled
test / startup (ubuntu-latest) (push) Has been cancelled
test / shellcheck (push) Has been cancelled
test / docs (push) Has been cancelled
2026-05-05 01:17:30 +08:00
67ffdfe99f Add reusable project test runner 2026-05-05 00:31:12 +08:00
1b9e8b3999 Add bootstrap dry-run safety checks
Some checks are pending
test / startup (macos-latest) (push) Waiting to run
test / startup (ubuntu-latest) (push) Waiting to run
test / shellcheck (push) Waiting to run
test / docs (push) Waiting to run
2026-05-04 11:49:20 +08:00
ddb4c691b9 Add installer dry-run and configure-only modes
Some checks are pending
test / startup (macos-latest) (push) Waiting to run
test / startup (ubuntu-latest) (push) Waiting to run
test / shellcheck (push) Waiting to run
test / docs (push) Waiting to run
2026-05-03 23:40:01 +08:00
d253583d0b Improve installer profile handling and validation 2026-05-03 23:23:21 +08:00
7ff5326932 Make Vim help profile aware 2026-05-03 23:23:21 +08:00
a9e16d22d3 Respect profiles in local config and status 2026-05-03 23:23:21 +08:00
db9b96f577 Refine Vim defaults and add profiles 2026-05-03 23:23:21 +08:00
cddb5fa725 feat(ui): native tabline + fixed-width signcolumn
Some checks failed
test / startup (macos-latest) (push) Has been cancelled
test / startup (ubuntu-latest) (push) Has been cancelled
test / shellcheck (push) Has been cancelled
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)
2026-04-27 18:08:40 +08:00
28e4ed3794 fix(ui): drop noisy colorcolumn, polish highlights, warn on missing colorscheme
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
2026-04-27 18:08:28 +08:00
4fd9a09948 fix: add missing visual mode mappings for clipboard, movement, and editing
Some checks are pending
test / startup (macos-latest) (push) Waiting to run
test / startup (ubuntu-latest) (push) Waiting to run
test / shellcheck (push) Waiting to run
,p ,P ,F ,W ,* now work in visual mode. 0→^ and C-d/C-u centering
carry into visual selections. Cheat sheet updated with (v) markers.
2026-04-26 15:32:55 +08:00
01c67d841b fix: audit fixes — shellcheck, TTY signcolumn, matchdelete race, docs accuracy
Some checks failed
test / startup (macos-latest) (push) Has been cancelled
test / startup (ubuntu-latest) (push) Has been cancelled
test / shellcheck (push) Has been cancelled
- install.sh: ls -A → find (shellcheck SC2012)
- navigation.vim: GFiles -nargs=? to support :GFiles?
- lsp.vim: signcolumn=yes gated behind !g:is_tty
- editing.vim: matchdelete in timer wrapped with silent!
- README: gofmt → goimports, plugin count 24–25
- CHANGELOG: annotate removed features (ChopsticksLearn, vim . layout)
2026-04-22 18:31:08 +08:00
196e88c2c8 docs: demo GIF with live API curl — 40s, 5 clean scenes
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.
2026-04-22 18:08:05 +08:00
4965b65041 docs: slow down demo GIF — 24s → 35s, 50ms typing, longer scene holds 2026-04-22 17:50:15 +08:00
2c7d190314 docs: re-record demo GIF — clean narrative, zero lint warnings
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.
2026-04-22 17:45:52 +08:00
a42c980d3e perf: remove ttyfast, add grepprg/diffopt, DRY FZF commands, conditional tmux-navigator
- Remove deprecated `set ttyfast` (no-op since Vim 8)
- Add grepprg=rg for :grep → quickfix integration
- Add diffopt with histogram algorithm
- Consolidate Rg/RgWord/GFiles (24 lines → 10, lazy preview)
- Load vim-tmux-navigator only inside tmux, Ctrl+hjkl fallback outside
2026-04-22 17:06:33 +08:00
f6631dfdf1 docs: re-record demo GIF — deterministic FZF handling, all 6 scenes clean 2026-04-22 16:51:52 +08:00
56c3917682 perf+feat: fix logiPat guard, skip 2 more built-ins, add git/format bindings
Performance:
- Fix g:loaded_logipat → g:loaded_logiPat (0.478ms → 0.017ms)
- Skip openPlugin + manpager (12 built-in plugins disabled total)

Features:
- ,af toggle format-on-save
- ,gL git log --oneline --graph
- ,gC FZF commits search, ,gB buffer commits
2026-04-22 16:30:28 +08:00
996b428809 docs: re-record demo GIF — clean viminfo, fix ALE warnings 2026-04-22 16:18:21 +08:00
ba39fca13b docs: re-record demo GIF — 7-scene feature showcase 2026-04-22 15:54:33 +08:00