From 2c3d121344bf9be7b8c5b59b8ead4cecb0ccdda8 Mon Sep 17 00:00:00 2001 From: Daniel Lynn Date: Mon, 12 Jul 2021 15:50:00 -0500 Subject: [PATCH] Add coc-git keybindings --- nvim/coc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/nvim/coc b/nvim/coc index e62ff25..fc434ac 100644 --- a/nvim/coc +++ b/nvim/coc @@ -138,3 +138,25 @@ nnoremap j :CocNext nnoremap k :CocPrev " Resume latest coc list. nnoremap p :CocListResume + +" CoC-Git mappings +" navigate chunks of current buffer +nmap [h (coc-git-prevchunk) +nmap ]h (coc-git-nextchunk) +" navigate conflicts of current buffer +nmap [c (coc-git-prevconflict) +nmap ]c (coc-git-nextconflict) +" show chunk diff at current position +nmap gs (coc-git-chunkinfo) +" show commit contains current position +nmap gc (coc-git-commit) +" create text object for git chunks +omap ig (coc-git-chunk-inner) +xmap ig (coc-git-chunk-inner) +omap ag (coc-git-chunk-outer) +xmap ag (coc-git-chunk-outer) +" undo current chunk +nmap hu :CocCommand git.chunkUndo +nmap hs :CocCommand git.chunkStage +" git list +nnoremap g :CocList --normal gstatus