diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-09-25 14:24:52 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-09-25 14:24:52 -0400 |
commit | e7681b948633fd8d43872f5375400db6f2829dd4 (patch) | |
tree | 15613c66ca7b51bf88d7647763c6d25beccaa18c | |
parent | 35ff775795ca2a843a47c7a65cc32c015feb582e (diff) | |
download | vim-e7681b948633fd8d43872f5375400db6f2829dd4.tar.gz vim-e7681b948633fd8d43872f5375400db6f2829dd4.tar.bz2 vim-e7681b948633fd8d43872f5375400db6f2829dd4.zip |
Added some useful keybindings.
-rw-r--r-- | vimrc | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -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' |