1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-12-22 07:41:41 +01:00

vim: shortcuts improvements

- add `T` when on python file to run the pytest test
    under the cursor
- add <leader>xx to open a work buffer
- cleanup fugitive diff/blame/log maps
- remove outdated maps
This commit is contained in:
bretello 2022-02-07 21:08:04 +01:00
parent 6fa513850c
commit 24e705b332
Signed by: brethil
GPG Key ID: 876AAC6290170FE7

View File

@ -20,6 +20,7 @@ autocmd! bufwritepost $DOTFILES/vim/plugs.vim PlugInstall
" Quickly open a markdown buffer for scribble
map <leader>x :e ~/buffer.md<CR>
map <leader>xx :e ~/projects/work/buffer.md<CR>
" Toggle paste mode on and off
nmap <leader>pp :setlocal paste!<CR>
@ -61,10 +62,10 @@ nnoremap <leader>k :Rg<CR>
"" Fugitive
nnoremap <leader>/ :Git<CR>
nnoremap <leader>\ :0Git<CR>
nnoremap <leader>Gd :Gvdiffsplit<CR>
nnoremap <leader>Gb :Git blame<CR>
nnoremap <leader>d :Gvdiffsplit<CR>
nnoremap <leader>b :Git blame<CR>
nnoremap <leader>Gp :Git push<CR>
nnoremap <leader>Gl :vert Git log<CR>
nnoremap <leader>l :vert Git log %<CR>
nnoremap <leader>Gc :Git commit<CR>
nnoremap <leader>Gpf :Git push --force-with-lease<CR>
@ -103,8 +104,9 @@ map <leader>J :Files<CR>
map <leader>f :History<CR>
map <leader>T :BTags<CR>
map <leader>t :Tags<CR>
map <leader>l :Lines<CR>
map <leader>c :CtrlPQuickfix<CR>
" map <leader>l :Lines<CR>
" FIXME: Not using CtrlP anymore, replace this with fzf
""map <leader>c :CtrlPQuickfix<CR>
map <leader>s :Snippets<CR>
map <leader>; :Commands<CR>
map <leader>m :Maps<CR>
@ -157,6 +159,7 @@ vnoremap <silent> <leader>gs :call GitShowVisual()<CR>
vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
nnoremap K :exe "Rg " . expand("<cword>")<cr>
autocmd FileType python nnoremap T :Pytest function --pdb<CR>
" Ultisnips
map <Leader>ue :UltiSnipsEdit<cr>