mirror of
https://oauth2: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@github.com/m1ngsama/chopsticks.git
synced 2026-05-10 19:10:59 +08:00
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
27 lines
1.4 KiB
VimL
27 lines
1.4 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>
|
|
nnoremap <leader>gL :Git log --oneline --graph -20<CR>
|
|
endif
|
|
|
|
" ── Conflict Navigation ────────────────────────────────────────────────────
|
|
|
|
nnoremap <silent> ]x /^\(<<<<<<<\\|=======\\|>>>>>>>\)<CR>
|
|
nnoremap <silent> [x ?^\(<<<<<<<\\|=======\\|>>>>>>>\)<CR>
|