mirror of
https://oauth2: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@github.com/m1ngsama/chopsticks.git
synced 2026-05-10 19:10:59 +08:00
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
This commit is contained in:
parent
996b428809
commit
56c3917682
7 changed files with 31 additions and 12 deletions
|
|
@ -4,6 +4,15 @@
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- `:ChopsticksStatus` diagnostic command — checks system tools, LSP servers, linters, formatters
|
- `:ChopsticksStatus` diagnostic command — checks system tools, LSP servers, linters, formatters
|
||||||
|
- `,af` toggle format-on-save (ALE `fix_on_save`)
|
||||||
|
- `,gL` git log graph (last 20 commits)
|
||||||
|
- `,gC` FZF git commits search, `,gB` buffer commits
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- `g:loaded_logipat` typo → `g:loaded_logiPat` — logiPat was loading fully (0.478ms wasted)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Skip 2 more built-in plugins: openPlugin, manpager (10 → 12 total)
|
||||||
|
|
||||||
## 2.1.0 — 2025-04-22
|
## 2.1.0 — 2025-04-22
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ jk exit insert mode ,? cheat sheet
|
||||||
|
|
||||||
### Git
|
### Git
|
||||||
|
|
||||||
`,gs` status | `,gd` diff | `,gb` blame | `,gc` commit | `,gp` push | `,gl` pull | `]x` `[x` conflict
|
`,gs` status | `,gd` diff | `,gb` blame | `,gc` commit | `,gp` push | `,gl` pull | `,gL` log graph | `,gC` FZF commits | `,gB` buffer commits | `]x` `[x` conflict
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
|
|
@ -104,7 +104,7 @@ jk exit insert mode ,? cheat sheet
|
||||||
|
|
||||||
### Toggle
|
### Toggle
|
||||||
|
|
||||||
`F2` paste | `F3` line numbers | `F4` relative numbers | `F6` invisible chars | `,ss` spell check
|
`F2` paste | `F3` line numbers | `F4` relative numbers | `F6` invisible chars | `,ss` spell check | `,af` format on save
|
||||||
|
|
||||||
### Utilities
|
### Utilities
|
||||||
|
|
||||||
|
|
@ -150,7 +150,7 @@ Each module is self-contained. Comment out one line in `.vimrc` to disable it. A
|
||||||
| Metric | Value |
|
| Metric | Value |
|
||||||
|--------|-------|
|
|--------|-------|
|
||||||
| Lazy-loaded | 7 plugins (on command or filetype) |
|
| Lazy-loaded | 7 plugins (on command or filetype) |
|
||||||
| Built-in plugins skipped | 10 (gzip, tar, zip, vimball, etc.) |
|
| Built-in plugins skipped | 12 (gzip, tar, zip, vimball, logiPat, etc.) |
|
||||||
| Large file threshold | 10MB (auto-disables syntax + undo) |
|
| Large file threshold | 10MB (auto-disables syntax + undo) |
|
||||||
| TTY large file | 500KB (syntax disabled) |
|
| TTY large file | 500KB (syntax disabled) |
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,15 @@ let g:is_tty = empty($TERM) || $TERM ==# 'dumb' || $TERM =~# 'linux'
|
||||||
let g:has_true_color = ($COLORTERM ==# 'truecolor' || $COLORTERM ==# '24bit')
|
let g:has_true_color = ($COLORTERM ==# 'truecolor' || $COLORTERM ==# '24bit')
|
||||||
|
|
||||||
" Skip built-in plugins we never use
|
" Skip built-in plugins we never use
|
||||||
let g:loaded_2html_plugin = 1
|
let g:loaded_2html_plugin = 1
|
||||||
let g:loaded_getscriptPlugin = 1
|
let g:loaded_getscriptPlugin = 1
|
||||||
let g:loaded_gzip = 1
|
let g:loaded_gzip = 1
|
||||||
let g:loaded_logipat = 1
|
let g:loaded_logiPat = 1
|
||||||
let g:loaded_rrhelper = 1
|
let g:loaded_rrhelper = 1
|
||||||
let g:loaded_tarPlugin = 1
|
let g:loaded_tarPlugin = 1
|
||||||
let g:loaded_vimballPlugin = 1
|
let g:loaded_vimballPlugin = 1
|
||||||
let g:loaded_zipPlugin = 1
|
let g:loaded_zipPlugin = 1
|
||||||
let g:loaded_tutor_mode_plugin = 1
|
let g:loaded_tutor_mode_plugin = 1
|
||||||
let g:loaded_spellfile_plugin = 1
|
let g:loaded_spellfile_plugin = 1
|
||||||
|
let g:loaded_openPlugin = 1
|
||||||
|
let g:loaded_manpager_plugin = 1
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ if exists('g:plugs["vim-fugitive"]')
|
||||||
nnoremap <leader>gl :Git pull<CR>
|
nnoremap <leader>gl :Git pull<CR>
|
||||||
nnoremap <leader>gd :Gdiffsplit<CR>
|
nnoremap <leader>gd :Gdiffsplit<CR>
|
||||||
nnoremap <leader>gb :Git blame<CR>
|
nnoremap <leader>gb :Git blame<CR>
|
||||||
|
nnoremap <leader>gL :Git log --oneline --graph -20<CR>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" ── Conflict Navigation ────────────────────────────────────────────────────
|
" ── Conflict Navigation ────────────────────────────────────────────────────
|
||||||
|
|
|
||||||
|
|
@ -50,4 +50,6 @@ if exists('g:plugs["ale"]')
|
||||||
nnoremap <silent> [e :ALEPrevious<cr>
|
nnoremap <silent> [e :ALEPrevious<cr>
|
||||||
nnoremap <silent> ]e :ALENext<cr>
|
nnoremap <silent> ]e :ALENext<cr>
|
||||||
nnoremap <silent> <leader>aD :ALEDetail<cr>
|
nnoremap <silent> <leader>aD :ALEDetail<cr>
|
||||||
|
nnoremap <silent> <leader>af :let g:ale_fix_on_save = !g:ale_fix_on_save
|
||||||
|
\ <bar> echo 'Format on save: ' . (g:ale_fix_on_save ? 'ON' : 'OFF')<cr>
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,8 @@ if exists('g:plugs["fzf.vim"]')
|
||||||
nnoremap <leader>fL :Lines<CR>
|
nnoremap <leader>fL :Lines<CR>
|
||||||
nnoremap <leader>f/ :History/<CR>
|
nnoremap <leader>f/ :History/<CR>
|
||||||
nnoremap <leader>f: :History:<CR>
|
nnoremap <leader>f: :History:<CR>
|
||||||
|
nnoremap <leader>gC :Commits<CR>
|
||||||
|
nnoremap <leader>gB :BCommits<CR>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:fzf_layout = { 'down': '40%' }
|
let g:fzf_layout = { 'down': '40%' }
|
||||||
|
|
|
||||||
|
|
@ -248,6 +248,7 @@ function! s:CheatSheet() abort
|
||||||
\ ' ,mt table of contents',
|
\ ' ,mt table of contents',
|
||||||
\ ' [g ]g LSP diagnostics',
|
\ ' [g ]g LSP diagnostics',
|
||||||
\ ' [e ]e ALE errors',
|
\ ' [e ]e ALE errors',
|
||||||
|
\ ' ,af format on save',
|
||||||
\ ' :LspInstallServer setup LSP',
|
\ ' :LspInstallServer setup LSP',
|
||||||
\ '',
|
\ '',
|
||||||
\ ' ── edit ──────────────────',
|
\ ' ── edit ──────────────────',
|
||||||
|
|
@ -268,6 +269,8 @@ function! s:CheatSheet() abort
|
||||||
\ ' ,gc commit',
|
\ ' ,gc commit',
|
||||||
\ ' ,gp push',
|
\ ' ,gp push',
|
||||||
\ ' ,gl pull',
|
\ ' ,gl pull',
|
||||||
|
\ ' ,gL log graph',
|
||||||
|
\ ' ,gC FZF commits',
|
||||||
\ ' [x ]x conflict markers',
|
\ ' [x ]x conflict markers',
|
||||||
\ '',
|
\ '',
|
||||||
\ ' ── windows ───────────────',
|
\ ' ── windows ───────────────',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue