mirror of
https://oauth2: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@github.com/m1ngsama/chopsticks.git
synced 2026-06-26 07:04:37 +08:00
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
This commit is contained in:
parent
74cc479a0e
commit
5156543702
3 changed files with 10 additions and 4 deletions
|
|
@ -23,6 +23,9 @@
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- README badge and `install.sh` recommend Vim 8.1+ instead of 8.0+ —
|
||||||
|
the runtime conditionally relies on patches `8.1.0360` (diffopt) and
|
||||||
|
`8.1.1517` (completeopt+=popup), so 8.0 users hit option errors
|
||||||
- `install.sh` no longer silently `PlugClean!`s user-added plugins from
|
- `install.sh` no longer silently `PlugClean!`s user-added plugins from
|
||||||
`~/.vim/plugged`; it now lists undeclared plugin directories first and
|
`~/.vim/plugged`; it now lists undeclared plugin directories first and
|
||||||
asks before removing them (`--yes` skips the removal entirely)
|
asks before removing them (`--yes` skips the removal entirely)
|
||||||
|
|
@ -40,6 +43,9 @@
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- `install.sh` "First steps inside Vim" block now leads with `,?`
|
||||||
|
(cheat sheet) — the single best onboarding asset is now the first
|
||||||
|
thing a new user sees after install, not the fourth
|
||||||
- `set exrc`/`set secure` are now opt-in via `g:chopsticks_enable_exrc = 1`;
|
- `set exrc`/`set secure` are now opt-in via `g:chopsticks_enable_exrc = 1`;
|
||||||
Vim no longer sources project-local `.vimrc`/`.exrc` from the working
|
Vim no longer sources project-local `.vimrc`/`.exrc` from the working
|
||||||
directory by default
|
directory by default
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT License"></a>
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT License"></a>
|
||||||
<a href="https://www.vim.org/"><img src="https://img.shields.io/badge/Vim-8.0%2B-brightgreen?style=flat-square" alt="Vim 8.0+"></a>
|
<a href="https://www.vim.org/"><img src="https://img.shields.io/badge/Vim-8.1%2B-brightgreen?style=flat-square" alt="Vim 8.1+"></a>
|
||||||
<a href="#install"><img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux-lightgrey?style=flat-square" alt="Platform"></a>
|
<a href="#install"><img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux-lightgrey?style=flat-square" alt="Platform"></a>
|
||||||
<a href="https://github.com/m1ngsama/chopsticks/actions"><img src="https://img.shields.io/github/actions/workflow/status/m1ngsama/chopsticks/test.yml?style=flat-square&label=tests" alt="Tests"></a>
|
<a href="https://github.com/m1ngsama/chopsticks/actions"><img src="https://img.shields.io/github/actions/workflow/status/m1ngsama/chopsticks/test.yml?style=flat-square&label=tests" alt="Tests"></a>
|
||||||
<a href="https://github.com/m1ngsama/chopsticks/releases"><img src="https://img.shields.io/github/v/release/m1ngsama/chopsticks?style=flat-square&color=orange" alt="Release"></a>
|
<a href="https://github.com/m1ngsama/chopsticks/releases"><img src="https://img.shields.io/github/v/release/m1ngsama/chopsticks?style=flat-square&color=orange" alt="Release"></a>
|
||||||
|
|
|
||||||
|
|
@ -519,7 +519,7 @@ fi
|
||||||
[[ -n "$VIM_BIN" ]] || die "vim installed but not found in PATH"
|
[[ -n "$VIM_BIN" ]] || die "vim installed but not found in PATH"
|
||||||
ok "Found: $("$VIM_BIN" --version | head -n1) ($VIM_BIN)"
|
ok "Found: $("$VIM_BIN" --version | head -n1) ($VIM_BIN)"
|
||||||
"$VIM_BIN" --version | grep -q 'Vi IMproved 8\|Vi IMproved 9' || \
|
"$VIM_BIN" --version | grep -q 'Vi IMproved 8\|Vi IMproved 9' || \
|
||||||
warn "Vim 8.0+ recommended for full async/LSP support — some features may not work"
|
warn "Vim 8.1+ recommended for full async/LSP support — some features may not work"
|
||||||
|
|
||||||
# Node.js (optional — vim-lsp needs no Node.js; only npm formatters do)
|
# Node.js (optional — vim-lsp needs no Node.js; only npm formatters do)
|
||||||
HAS_NODE=0; command -v node >/dev/null 2>&1 && HAS_NODE=1
|
HAS_NODE=0; command -v node >/dev/null 2>&1 && HAS_NODE=1
|
||||||
|
|
@ -1201,10 +1201,10 @@ echo -e " ${CYAN}vim .${NC} Open dashboard in current directory"
|
||||||
echo -e " ${CYAN}vim myfile${NC} Edit a specific file"
|
echo -e " ${CYAN}vim myfile${NC} Edit a specific file"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD} First steps inside Vim${NC}"
|
echo -e "${BOLD} First steps inside Vim${NC}"
|
||||||
|
echo -e " ${CYAN},?${NC} Open cheat sheet — your map of every keybinding"
|
||||||
echo -e " ${CYAN}Esc${NC} Exit insert mode → back to Normal"
|
echo -e " ${CYAN}Esc${NC} Exit insert mode → back to Normal"
|
||||||
echo -e " ${CYAN}:q!${NC} + Enter Emergency quit without saving"
|
|
||||||
echo -e " ${CYAN},x${NC} Save and quit"
|
echo -e " ${CYAN},x${NC} Save and quit"
|
||||||
echo -e " ${CYAN},?${NC} Open cheat sheet"
|
echo -e " ${CYAN}:q!${NC} + Enter Emergency quit without saving"
|
||||||
if [[ $CONFIG_PROFILE != "minimal" ]]; then
|
if [[ $CONFIG_PROFILE != "minimal" ]]; then
|
||||||
echo -e " ${CYAN}:LspInstallServer${NC} Install LSP for current filetype"
|
echo -e " ${CYAN}:LspInstallServer${NC} Install LSP for current filetype"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue