chopsticks/modules/git.vim
m1ngsama dbb11c9473 perf: 23ms → 19ms — drop vim-unimpaired, runtime tuning
Startup: replace vim-unimpaired (2.5ms) with 2-line blank line insertion.
29 plugins now. All [q/]q, [e/]e, [x/]x mappings were already ours.

Runtime:
- ALE lint_delay=200ms, echo_delay=100ms — less thrashing during edits
- LSP virtual_text_delay=200ms, highlight_delay=200ms, echo_delay=100ms
- Disable gitgutter default mappings (map_keys=0) — we don't use them
- Merge two BufReadPre large-file autocmds into one (single getfsize)
- Remove redundant filetype detection autocmds (Vim 9.2 handles natively)
2026-04-22 00:46:00 +08:00

26 lines
1.3 KiB
VimL

" git.vim — Fugitive mappings, GitGutter config, conflict navigation
" ── GitGutter ───────────────────────────────────────────────────────────────
let g:gitgutter_map_keys = 0
let g:gitgutter_sign_added = '+'
let g:gitgutter_sign_modified = '~'
let g:gitgutter_sign_removed = '-'
let g:gitgutter_sign_removed_first_line = '^'
let g:gitgutter_sign_modified_removed = '~'
" ── Fugitive ────────────────────────────────────────────────────────────────
if exists('g:plugs["vim-fugitive"]')
nnoremap <leader>gs :Git status<CR>
nnoremap <leader>gc :Git commit<CR>
nnoremap <leader>gp :Git push<CR>
nnoremap <leader>gl :Git pull<CR>
nnoremap <leader>gd :Gdiffsplit<CR>
nnoremap <leader>gb :Git blame<CR>
endif
" ── Conflict Navigation ────────────────────────────────────────────────────
nnoremap <silent> ]x /^\(<<<<<<<\\|=======\\|>>>>>>>\)<CR>
nnoremap <silent> [x ?^\(<<<<<<<\\|=======\\|>>>>>>>\)<CR>