summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vimrc23
1 files changed, 23 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index 7ea450a..ea1c98e 100644
--- a/vimrc
+++ b/vimrc
@@ -59,6 +59,29 @@ inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
+vmap <leader>p <Plug>(coc-format-selected)
+nmap <leader>p <Plug>(coc-format-selected)
+nmap <leader>P <Plug>(coc-format)
+nmap <leader>f <Plug>(coc-fix-current)
+nmap <leader>r <Plug>(coc-rename)
+nmap <leader>d <Plug>(coc-definition)
+nmap <leader>h <Plug>(coc-action-doHover)
+
+nmap [g <Plug>(coc-git-prevchunk)
+nmap ]g <Plug>(coc-git-nextchunk)
+" show chunk diff at current position
+nmap gs <Plug>(coc-git-chunkinfo)
+" show commit contains current position
+nmap gc <Plug>(coc-git-commit)
+" create text object for git chunks
+omap ic <Plug>(coc-text-object-inner)
+xmap ic <Plug>(coc-text-object-inner)
+omap ic <Plug>(coc-text-object-outer)
+xmap ic <Plug>(coc-text-object-outer)
+
+nmap ga :CocCommand git.chunkStage<cr>
+nmap gu :CocCommand git.chunkUndo<cr>
+
call plug#begin()
Plug 'lervag/vimtex'