From fd29dd160efd617704009b631f53a0ac9eb8264b Mon Sep 17 00:00:00 2001 From: m1ngsama Date: Sat, 23 May 2026 20:00:00 +0800 Subject: [PATCH] Add local config commands --- .vimrc | 1 + BETA.md | 6 +++++- CHANGELOG.md | 2 ++ QUICKSTART.md | 4 ++++ README.md | 24 +++++++++++++-------- doc/chopsticks.txt | 19 ++++++++++++++++- modules/cheatsheet.vim | 6 ++++++ modules/status.vim | 10 +++++++++ modules/tutor.vim | 8 +++++++ modules/utilities.vim | 48 ++++++++++++++++++++++++++++++++++++++++-- scripts/test-quick.sh | 6 ++++-- scripts/test-vim.sh | 28 +++++++++++++++++++++--- 12 files changed, 144 insertions(+), 18 deletions(-) diff --git a/.vimrc b/.vimrc index e454039..878942e 100644 --- a/.vimrc +++ b/.vimrc @@ -9,6 +9,7 @@ let s:xdg_config_home = !empty($XDG_CONFIG_HOME) && $XDG_CONFIG_HOME =~# '^/' \ : '~/.config' let s:local_config = expand(get(g:, 'chopsticks_local_config', \ s:xdg_config_home . '/chopsticks.vim')) +let g:chopsticks_resolved_local_config = s:local_config if filereadable(s:local_config) execute 'source ' . fnameescape(s:local_config) endif diff --git a/BETA.md b/BETA.md index f2dbcca..fd32895 100644 --- a/BETA.md +++ b/BETA.md @@ -35,6 +35,9 @@ let g:chopsticks_profile = 'engineer' let g:chopsticks_keymap_style = 'space' ``` +Inside Vim, `:ChopsticksConfig` opens that file and `:ChopsticksReload` +reloads chopsticks after saving it. + ## Daily test loop Use the beta for real editing, not only demos. For each session, record: @@ -57,7 +60,8 @@ SPC SPC find file SPC / grep project s + 2ch jump on screen gd / gr definition / references SPC rr run current file SPC gs git status SPC cf format SPC ca code action -SPC ? active cheat sheet :ChopsticksStatus health +SPC fc local config SPC ? active cheat sheet +:ChopsticksStatus health :ChopsticksConfig preferences ``` Also test the boring path: save, quit, reopen Vim, edit over SSH, open a large diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f0df00..480cfd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ - `:ChopsticksCheatSheet` command, with `SPC ?` as the discoverable default - `:ChopsticksHelp` and native `:help chopsticks` documentation for in-editor support without a separate wiki +- `:ChopsticksConfig` and `:ChopsticksReload` for editing local preferences + without touching the managed `.vimrc` - `:ChopsticksBeta`, `:ChopsticksBetaLog`, and `:ChopsticksBetaSession` for guided beta testing and local session notes - Dedicated modules for buffers, utilities, files, runner, quickfix, status, diff --git a/QUICKSTART.md b/QUICKSTART.md index d4efcba..30edaf9 100644 --- a/QUICKSTART.md +++ b/QUICKSTART.md @@ -51,6 +51,7 @@ SPC w save SPC qx save + quit :q! force quit SPC ? cheat sheet (toggle sidebar) +SPC fc edit local preferences :ChopsticksHelp full native help ``` @@ -62,6 +63,7 @@ Esc back to Normal ,x save + quit :q! force quit ,? cheat sheet (toggle sidebar) +,ec edit local preferences :ChopsticksHelp full native help ``` @@ -140,6 +142,8 @@ syntax. Enable the heavier Markdown tools only when you want them. ``` :ChopsticksHelp full native Vim help +:ChopsticksConfig edit local preferences +:ChopsticksReload reload after saving local preferences :ChopsticksTutor guided practice for the final keymap :ChopsticksStatus see what's installed and what's missing ``` diff --git a/README.md b/README.md index 2d86a16..8cd4ea3 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,9 @@ That assembly work is the pain chopsticks removes: - **Remote editing is fragile.** It is built to degrade on TTY, slow SSH, and headless machines instead of assuming a GUI desktop. - **Custom configs are hard to onboard.** `:ChopsticksHelp`, `SPC ?`, - `:ChopsticksTutor`, and `:ChopsticksStatus` make the active keymap, full - help, and missing tools visible inside Vim. + `:ChopsticksTutor`, `:ChopsticksConfig`, and `:ChopsticksStatus` make the + active keymap, full help, local preferences, and missing tools visible inside + Vim. You SSH into a server. You need to edit code. You want LSP, fuzzy find, git integration, format-on-save — not a 20-minute setup. @@ -129,7 +130,9 @@ into Markdown lint, format, spell, conceal, Marksman, and LSP virtual text. Project updates leave `~/.config/chopsticks.vim` alone, so put local choices there instead of editing the managed `.vimrc`. The `SPC ?` cheat sheet follows -the active profile and only shows keys for enabled features. +the active profile and only shows keys for enabled features. Inside Vim, use +`:ChopsticksConfig` to edit that local file and `:ChopsticksReload` after +saving it. ## Keys @@ -144,7 +147,8 @@ for native `S`. For onboarding, use `:ChopsticksHelp` / `:help chopsticks` for full native Vim help, `:ChopsticksTutor` for a guided practice page, `SPC ?` for the active -keymap, and `:ChopsticksStatus` for tool/LSP health. +keymap, `:ChopsticksConfig` for local preferences, and `:ChopsticksStatus` for +tool/LSP health. `QUICKSTART.md` is the 5-minute path; this README is the full reference. During the beta, `:ChopsticksBeta` opens the in-editor test checklist, `:ChopsticksBetaLog` opens editable local notes, and `:ChopsticksBetaSession` @@ -157,6 +161,7 @@ SPC e toggle file sidebar SPC rr run current file SPC gs git status SPC cf format SPC w save SPC qq quit Esc exit insert mode SPC ? cheat sheet +:ChopsticksConfig local prefs :ChopsticksReload reload ```
@@ -168,7 +173,7 @@ Esc exit insert mode SPC ? cheat sheet ### Files -`SPC ff` files | `SPC fb` buffers | `SPC fg` git files | `SPC fr` recent | `SPC fl` buffer lines | `SPC fL` all lines | `SPC fv` edit vimrc | `SPC fV` reload vimrc +`SPC ff` files | `SPC fb` buffers | `SPC fg` git files | `SPC fr` recent | `SPC fl` buffer lines | `SPC fL` all lines | `SPC fc` local config | `SPC fv` edit vimrc | `SPC fV` reload ### Search @@ -200,7 +205,7 @@ Esc exit insert mode SPC ? cheat sheet ### Survival -`SPC w` save | `SPC W` save all | `SPC qq` quit | `SPC qx` save and quit | `SPC ?` cheat sheet | `:ChopsticksHelp` full help | `:ChopsticksTutor` practice | `:ChopsticksStatus` diagnostics +`SPC w` save | `SPC W` save all | `SPC qq` quit | `SPC qx` save and quit | `SPC fc` local config | `SPC fV` reload | `SPC ?` cheat sheet | `:ChopsticksHelp` full help | `:ChopsticksTutor` practice | `:ChopsticksStatus` diagnostics
@@ -237,7 +242,7 @@ Esc exit insert mode SPC ? cheat sheet ### Utilities -`,cp` copy full path | `,cf` copy filename | `,ev` edit vimrc | `,sv` reload vimrc | `,wa` save all | `:ChopsticksStatus` diagnostics +`,cp` copy full path | `,cf` copy filename | `,ec` local config | `,ev` edit vimrc | `,sv` reload | `,wa` save all | `:ChopsticksStatus` diagnostics @@ -298,7 +303,7 @@ For Markdown LSP, install or select `marksman` first. ├── git.vim fugitive, gitgutter, conflict nav ├── languages.vim vim-go, markdown, filetype settings ├── buffers.vim buffer commands - ├── utilities.vim reindent, trim, clipboard, vimrc helpers + ├── utilities.vim config, reload, trim, clipboard helpers ├── files.vim auto mkdir, large-file protection ├── runner.vim run current file ├── quickfix.vim quickfix and location-list helpers @@ -333,7 +338,8 @@ Each module is self-contained. Comment out one line in `.vimrc` to disable it. A | What's installed? | `:ChopsticksStatus` shows tools, LSP, linters | For deeper checks, start with `:ChopsticksStatus`, `SPC ?`, -`:ChopsticksTutor`, `:ChopsticksHelp`, and [QUICKSTART.md](QUICKSTART.md). +`:ChopsticksTutor`, `:ChopsticksHelp`, `:ChopsticksConfig`, and +[QUICKSTART.md](QUICKSTART.md). ## Contributing diff --git a/doc/chopsticks.txt b/doc/chopsticks.txt index 794f87d..f2c66b8 100644 --- a/doc/chopsticks.txt +++ b/doc/chopsticks.txt @@ -31,6 +31,7 @@ Inside Vim: SPC ? active keymap cheat sheet :ChopsticksStatus tool, plugin, and LSP diagnostics :ChopsticksHelp this help page + :ChopsticksConfig edit local preferences < Daily loop: @@ -62,7 +63,8 @@ High-frequency keys: SPC e/E file sidebar SPC rr run file SPC gs git status SPC gl git log graph SPC ca code action SPC cr rename - SPC cf format SPC ? cheat sheet + SPC cf format SPC fc edit local config + SPC fV reload config SPC ? cheat sheet < Classic comma mappings remain available: @@ -76,6 +78,8 @@ COMMANDS *chopsticks-commands User-facing commands: > :ChopsticksHelp open this help + :ChopsticksConfig edit local preferences + :ChopsticksReload reload chopsticks after config changes :ChopsticksTutor guided practice :ChopsticksCheatSheet active keymap reference :ChopsticksStatus health diagnostics @@ -100,6 +104,16 @@ Keep personal choices outside the managed .vimrc: let g:chopsticks_keymap_style = 'space' < +Open that file from inside Vim: +> + :ChopsticksConfig +< + +Reload after saving it: +> + :ChopsticksReload +< + Profiles: minimal Core navigation, editing, git, Markdown. No LSP/ALE/completion. @@ -147,6 +161,7 @@ Start with: SPC ? :ChopsticksTutor :ChopsticksHelp + :ChopsticksConfig < Common fixes: @@ -155,6 +170,8 @@ Common fixes: LSP missing Open that filetype, then :LspInstallServer Need active keys SPC ? Need full docs :help chopsticks + Need local config :ChopsticksConfig + Changed local config :ChopsticksReload Need beta notes :ChopsticksBetaSession Slow large file Syntax, undo, swap, and ALE are auto-reduced diff --git a/modules/cheatsheet.vim b/modules/cheatsheet.vim index 05f9884..5999d4e 100644 --- a/modules/cheatsheet.vim +++ b/modules/cheatsheet.vim @@ -145,9 +145,12 @@ function! s:CheatSheet() abort \ ' SPC qq quit', \ ' SPC qx save + quit', \ ' Esc exit insert', + \ ' SPC fc edit local config', \ ' SPC fv edit vimrc', \ ' SPC fV reload vimrc', \ ' :ChopsticksHelp full help', + \ ' :ChopsticksConfig local config', + \ ' :ChopsticksReload reload config', \ ' :ChopsticksTutor practice', \ ' :ChopsticksStatus health', \ ' :ChopsticksBeta beta test guide', @@ -259,9 +262,12 @@ function! s:CheatSheet() abort \ ' ,q quit', \ ' ,x save + quit', \ ' Esc exit insert', + \ ' ,ec edit local config', \ ' ,ev edit vimrc', \ ' ,sv reload vimrc', \ ' :ChopsticksHelp full help', + \ ' :ChopsticksConfig local config', + \ ' :ChopsticksReload reload config', \ ' :ChopsticksTutor practice', \ ' :ChopsticksStatus health', \ ' :ChopsticksBeta beta test guide', diff --git a/modules/status.vim b/modules/status.vim index 8e1d2c5..dfeb3ab 100644 --- a/modules/status.vim +++ b/modules/status.vim @@ -80,12 +80,22 @@ function! s:BetaLogPath() abort return expand(l:xdg . '/chopsticks-beta.md') endfunction +function! s:LocalConfigPath() abort + let l:xdg = !empty($XDG_CONFIG_HOME) && $XDG_CONFIG_HOME =~# '^/' + \ ? $XDG_CONFIG_HOME + \ : '~/.config' + return expand(get(g:, 'chopsticks_resolved_local_config', + \ get(g:, 'chopsticks_local_config', l:xdg . '/chopsticks.vim'))) +endfunction + function! s:ChopsticksStatus() abort let l:lines = [] call add(l:lines, 'chopsticks status') call add(l:lines, repeat('─', 50)) call add(l:lines, '') call add(l:lines, ' help :ChopsticksHelp :ChopsticksTutor SPC ?') + call add(l:lines, ' config ' . s:LocalConfigPath()) + call add(l:lines, ' commands :ChopsticksConfig :ChopsticksReload') call add(l:lines, '') if !empty(get(g:, 'chopsticks_beta_label', '')) diff --git a/modules/tutor.vim b/modules/tutor.vim index 67e86e2..0236b98 100644 --- a/modules/tutor.vim +++ b/modules/tutor.vim @@ -28,7 +28,11 @@ function! s:ChopsticksTutor() abort \ ' SPC ? active cheat sheet', \ ' SPC w save', \ ' SPC qx save and quit', + \ ' SPC fc edit local config', + \ ' SPC fV reload config', \ ' :ChopsticksHelp full help', + \ ' :ChopsticksConfig local config', + \ ' :ChopsticksReload reload config', \ ' :ChopsticksStatus health check', \ ' :ChopsticksBeta beta checklist', \ ' :ChopsticksBetaLog beta notes', @@ -93,7 +97,11 @@ function! s:ChopsticksTutor() abort \ ' hjkl split navigation', \ '', \ ' support', + \ ' ,ec edit local config', + \ ' ,sv reload config', \ ' :ChopsticksHelp full help', + \ ' :ChopsticksConfig local config', + \ ' :ChopsticksReload reload config', \ ' :ChopsticksStatus health check', \ ' :ChopsticksBeta beta checklist', \ ' :ChopsticksBetaLog beta notes', diff --git a/modules/utilities.vim b/modules/utilities.vim index 9988a42..20aa88c 100644 --- a/modules/utilities.vim +++ b/modules/utilities.vim @@ -1,5 +1,47 @@ " utilities.vim — small editing and config helpers +function! s:LocalConfigPath() abort + let l:xdg = !empty($XDG_CONFIG_HOME) && $XDG_CONFIG_HOME =~# '^/' + \ ? $XDG_CONFIG_HOME + \ : '~/.config' + return expand(get(g:, 'chopsticks_resolved_local_config', + \ get(g:, 'chopsticks_local_config', l:xdg . '/chopsticks.vim'))) +endfunction + +function! s:EditLocalConfig() abort + let l:path = s:LocalConfigPath() + let l:new_file = !filereadable(l:path) + let l:dir = fnamemodify(l:path, ':h') + if !isdirectory(l:dir) + call mkdir(l:dir, 'p') + endif + + execute 'edit ' . fnameescape(l:path) + setlocal filetype=vim + if l:new_file && line('$') == 1 && getline(1) ==# '' + call setline(1, [ + \ '" chopsticks local preferences', + \ "let g:chopsticks_profile = 'engineer'", + \ "let g:chopsticks_keymap_style = 'space'", + \ '', + \ '" Optional habits:', + \ '" let g:chopsticks_enable_jk_escape = 1', + \ '" let g:chopsticks_enable_ctrl_s_save = 1', + \ '" let g:chopsticks_enable_auto_pairs = 1', + \ ]) + setlocal nomodified + endif +endfunction + +function! s:ReloadChopsticks() abort + unlet! g:chopsticks_loaded + execute 'source ' . fnameescape($MYVIMRC) + echo 'chopsticks reloaded' +endfunction + +command! ChopsticksConfig call s:EditLocalConfig() +command! ChopsticksReload call s:ReloadChopsticks() + if get(g:, 'chopsticks_enable_reindent_file', 0) if g:chopsticks_space_keymaps nnoremap c= gg=G`` @@ -34,11 +76,13 @@ else endif if g:chopsticks_space_keymaps + nnoremap fc :ChopsticksConfig nnoremap fv :edit $MYVIMRC - nnoremap fV :unlet! g:chopsticks_loaded:execute 'source ' . fnameescape($MYVIMRC):echo "vimrc reloaded" + nnoremap fV :ChopsticksReload else + nnoremap ec :ChopsticksConfig nnoremap ev :edit $MYVIMRC - nnoremap sv :unlet! g:chopsticks_loaded:execute 'source ' . fnameescape($MYVIMRC):echo "vimrc reloaded" + nnoremap sv :ChopsticksReload endif if g:chopsticks_space_keymaps diff --git a/scripts/test-quick.sh b/scripts/test-quick.sh index 8a2cdd5..f00ba0e 100755 --- a/scripts/test-quick.sh +++ b/scripts/test-quick.sh @@ -29,8 +29,8 @@ check_docs() { markdownlint README.md QUICKSTART.md CONTRIBUTING.md CHANGELOG.md BETA.md step "Documentation consistency" - for command in ChopsticksHelp ChopsticksBeta ChopsticksBetaLog \ - ChopsticksBetaSession + for command in ChopsticksHelp ChopsticksConfig ChopsticksReload \ + ChopsticksBeta ChopsticksBetaLog ChopsticksBetaSession do for file in README.md BETA.md doc/chopsticks.txt modules/cheatsheet.vim \ modules/tutor.vim modules/status.vim @@ -44,6 +44,8 @@ check_docs() { grep -Fq '*chopsticks.txt*' doc/chopsticks.txt grep -Fq '*chopsticks-v3-space*' doc/chopsticks.txt grep -Fq 'command! ChopsticksHelp' modules/help.vim + grep -Fq 'command! ChopsticksConfig' modules/utilities.vim + grep -Fq 'command! ChopsticksReload' modules/utilities.vim for command in ChopsticksBeta ChopsticksBetaLog ChopsticksBetaSession; do grep -Fq "command! $command" modules/beta.vim || { echo "Missing $command definition in modules/beta.vim" >&2 diff --git a/scripts/test-vim.sh b/scripts/test-vim.sh index d383e34..cf30b58 100755 --- a/scripts/test-vim.sh +++ b/scripts/test-vim.sh @@ -67,16 +67,27 @@ check_vim() { vim -u NONE -i NONE -es -N \ -c "let g:chopsticks_local_config = '$TMP_ROOT/local/config.vim'" \ -c 'source .vimrc' \ - -c 'if g:chopsticks_profile !=# "minimal" || has_key(g:plugs, "ale") || has_key(g:plugs, "vim-lsp") || has_key(g:plugs, "auto-pairs") | cquit | endif' \ + -c 'if g:chopsticks_resolved_local_config !~# "config.vim$" || g:chopsticks_profile !=# "minimal" || has_key(g:plugs, "ale") || has_key(g:plugs, "vim-lsp") || has_key(g:plugs, "auto-pairs") | cquit | endif' \ -c 'qa!' 2>&1 mkdir -p "$TMP_ROOT/xdg" printf "%s\n" "let g:chopsticks_profile = 'minimal'" > "$TMP_ROOT/xdg/chopsticks.vim" XDG_CONFIG_HOME="$TMP_ROOT/xdg" vim -u NONE -i NONE -es -N \ -c 'source .vimrc' \ - -c 'if g:chopsticks_profile !=# "minimal" || has_key(g:plugs, "ale") || has_key(g:plugs, "vim-lsp") || has_key(g:plugs, "auto-pairs") | cquit | endif' \ + -c 'if g:chopsticks_resolved_local_config !~# "chopsticks.vim$" || g:chopsticks_profile !=# "minimal" || has_key(g:plugs, "ale") || has_key(g:plugs, "vim-lsp") || has_key(g:plugs, "auto-pairs") | cquit | endif' \ -c 'qa!' 2>&1 + local_config_cmd="$TMP_ROOT/config command/chopsticks.vim" + vim -u NONE -i NONE -es -N \ + -c "let g:chopsticks_local_config = '$local_config_cmd'" \ + -c 'source .vimrc' \ + -c 'ChopsticksConfig' \ + -c 'if expand("%:p") !=# g:chopsticks_resolved_local_config || &l:filetype !=# "vim" | cquit | endif' \ + -c 'if getline(1) !~# "chopsticks local preferences" || &modified | cquit | endif' \ + -c 'qa!' 2>&1 + test -d "$(dirname "$local_config_cmd")" + test ! -e "$local_config_cmd" + XDG_CONFIG_HOME="$EMPTY_XDG" vim -u .vimrc -i NONE -es -N \ -c 'ChopsticksStatus' \ -c "redir! > $TMP_ROOT/status-default.txt" \ @@ -89,6 +100,7 @@ check_vim() { fi grep -Fq 'OK vim-lsp stack (installed)' "$TMP_ROOT/status-default.txt" grep -Fq 'help :ChopsticksHelp :ChopsticksTutor SPC ?' "$TMP_ROOT/status-default.txt" + grep -Fq 'commands :ChopsticksConfig :ChopsticksReload' "$TMP_ROOT/status-default.txt" grep -Fq 'candidate 3.0.0-beta.1' "$TMP_ROOT/status-default.txt" grep -Fq 'keymap space' "$TMP_ROOT/status-default.txt" grep -Fq 'commands :ChopsticksBeta :ChopsticksBetaLog' "$TMP_ROOT/status-default.txt" @@ -113,6 +125,7 @@ check_vim() { -c 'source .vimrc' \ -c 'let last_change_map = nr2char(96) . "[v" . nr2char(96) . "]"' \ -c 'if mapleader !=# "," || maparg("s", "n") !=# "" || maparg(",/", "v") !~# "escape" || maparg(",v", "n") !=# last_change_map || maparg(",ff", "n") !~# "SmartFiles" | cquit | endif' \ + -c 'if maparg(",ec", "n") !~# "ChopsticksConfig" || maparg(",sv", "n") !~# "ChopsticksReload" | cquit | endif' \ -c 'if maparg(",gp", "n") !=# "" || maparg(",gl", "n") !=# "" | cquit | endif' \ -c 'qa!' 2>&1 @@ -238,7 +251,7 @@ check_vim() { -c 'if maparg(",ff", "n") !=# "" || maparg(",w", "n") !=# "" || maparg(",mt", "n") !=# "" || maparg(",gp", "n") !=# "" || maparg("gp", "n") !=# "" | cquit | endif' \ -c 'if maparg("f", "n") !=# "" || maparg("q", "n") !=# "" || maparg("u", "n") !=# "" || maparg("c", "n") !=# "" || maparg("x", "n") !=# "" || maparg("wm", "n") !=# "" || maparg("w+", "n") !=# "" || maparg("w-", "n") !=# "" | cquit | endif' \ -c 'if maparg("", "n") !~# "SmartFiles" || maparg("ff", "n") !~# "SmartFiles" || maparg(",", "n") !~# "Buffers" || maparg("bd", "n") !~# "Bclose" | cquit | endif' \ - -c 'if maparg("w", "n") !~# ":w" || maparg("W", "n") !~# ":wa" || maparg("qq", "n") !~# ":q" || maparg("qx", "n") !~# ":x" || maparg("U", "n") !~# "UndotreeToggle" || maparg("fs", "n") !=# "" || maparg("bu", "n") !=# "" | cquit | endif' \ + -c 'if maparg("w", "n") !~# ":w" || maparg("W", "n") !~# ":wa" || maparg("qq", "n") !~# ":q" || maparg("qx", "n") !~# ":x" || maparg("fc", "n") !~# "ChopsticksConfig" || maparg("fV", "n") !~# "ChopsticksReload" || maparg("U", "n") !~# "UndotreeToggle" || maparg("fs", "n") !=# "" || maparg("bu", "n") !=# "" | cquit | endif' \ -c 'if maparg("gl", "n") !~# "Git log" || maparg("gC", "n") !~# "Commits" | cquit | endif' \ -c 'qa!' 2>&1 @@ -266,9 +279,12 @@ check_vim() { grep -Fq '[d ]d LSP diagnostics' "$TMP_ROOT/cheat-default.txt" grep -Fq 'hjkl navigate splits' "$TMP_ROOT/cheat-default.txt" grep -Fq 'SPC w save' "$TMP_ROOT/cheat-default.txt" + grep -Fq 'SPC fc edit local config' "$TMP_ROOT/cheat-default.txt" grep -Fq 's+2ch easymotion jump' "$TMP_ROOT/cheat-default.txt" grep -Fq 'cl / cc native s / S substitute' "$TMP_ROOT/cheat-default.txt" grep -Fq ':ChopsticksHelp full help' "$TMP_ROOT/cheat-default.txt" + grep -Fq ':ChopsticksConfig local config' "$TMP_ROOT/cheat-default.txt" + grep -Fq ':ChopsticksReload reload config' "$TMP_ROOT/cheat-default.txt" grep -Fq ':ChopsticksTutor practice' "$TMP_ROOT/cheat-default.txt" grep -Fq ':ChopsticksBeta beta test guide' "$TMP_ROOT/cheat-default.txt" grep -Fq ':ChopsticksBetaLog beta notes' "$TMP_ROOT/cheat-default.txt" @@ -299,6 +315,8 @@ check_vim() { grep -Fq ',dd definition' "$TMP_ROOT/cheat-classic.txt" grep -Fq ',dk hover docs' "$TMP_ROOT/cheat-classic.txt" grep -Fq ',dp ,dn LSP diagnostics' "$TMP_ROOT/cheat-classic.txt" + grep -Fq ',ec edit local config' "$TMP_ROOT/cheat-classic.txt" + grep -Fq ':ChopsticksConfig local config' "$TMP_ROOT/cheat-classic.txt" if grep -Eq ',gp push|,gl pull' "$TMP_ROOT/cheat-classic.txt"; then cat "$TMP_ROOT/cheat-classic.txt" exit 1 @@ -329,6 +347,7 @@ check_vim() { grep -Fq 'SPC w save' "$TMP_ROOT/cheat-space.txt" grep -Fq 'gd definition' "$TMP_ROOT/cheat-space.txt" grep -Fq 'SPC gl log graph' "$TMP_ROOT/cheat-space.txt" + grep -Fq 'SPC fc edit local config' "$TMP_ROOT/cheat-space.txt" grep -Fq 's+2ch easymotion jump' "$TMP_ROOT/cheat-space.txt" if grep -Eq ',w save|,gp push|SPC gp push|SPC gl pull|SPC fs save|SPC cd definition|SPC f format' "$TMP_ROOT/cheat-space.txt"; then cat "$TMP_ROOT/cheat-space.txt" @@ -343,7 +362,9 @@ check_vim() { -c 'qa!' 2>&1 grep -Fq 'chopsticks tutor' "$TMP_ROOT/tutor-default.txt" grep -Fq 'SPC ? active cheat sheet' "$TMP_ROOT/tutor-default.txt" + grep -Fq 'SPC fc edit local config' "$TMP_ROOT/tutor-default.txt" grep -Fq ':ChopsticksHelp full help' "$TMP_ROOT/tutor-default.txt" + grep -Fq ':ChopsticksConfig local config' "$TMP_ROOT/tutor-default.txt" grep -Fq 's + 2 chars visible jump' "$TMP_ROOT/tutor-default.txt" grep -Fq 'cl / cc native s / S substitute' "$TMP_ROOT/tutor-default.txt" grep -Fq 'gd / gr / K definition / refs / docs' "$TMP_ROOT/tutor-default.txt" @@ -358,6 +379,7 @@ check_vim() { -c 'qa!' 2>&1 grep -Fq 'classic layout' "$TMP_ROOT/tutor-classic.txt" grep -Fq ',? active cheat sheet' "$TMP_ROOT/tutor-classic.txt" + grep -Fq ',ec edit local config' "$TMP_ROOT/tutor-classic.txt" grep -Fq ',S + 2 chars EasyMotion jump' "$TMP_ROOT/tutor-classic.txt" XDG_CONFIG_HOME="$EMPTY_XDG" vim -u .vimrc -i NONE -es -N \