summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-09-25 14:24:52 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-09-25 14:24:52 -0400
commite7681b948633fd8d43872f5375400db6f2829dd4 (patch)
tree15613c66ca7b51bf88d7647763c6d25beccaa18c
parent35ff775795ca2a843a47c7a65cc32c015feb582e (diff)
downloadvim-e7681b948633fd8d43872f5375400db6f2829dd4.tar.gz
vim-e7681b948633fd8d43872f5375400db6f2829dd4.tar.bz2
vim-e7681b948633fd8d43872f5375400db6f2829dd4.zip
Added some useful keybindings.
-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'