chopsticks/modules/git.vim
m1ngsama 6044fc5fcb refactor: modular architecture — split .vimrc into 12 self-contained modules
Replace the monolithic 1268-line .vimrc with a thin loader that sources
12 modules under modules/ (env, plugins, core, ui, editing, navigation,
lsp, lint, git, writing, languages, tools). Each module is independently
readable and can be toggled by commenting one line.

Add interactive tutorial (tutor/chopsticks.tutor) with 10 lessons covering
all features. Users can run :ChopsticksLearn to start.
2026-04-22 00:05:10 +08:00

25 lines
1.3 KiB
VimL

" git.vim — Fugitive mappings, GitGutter config, conflict navigation
" ── GitGutter ───────────────────────────────────────────────────────────────
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>