mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-22 11:31:30 +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:
parent
6fa513850c
commit
24e705b332
|
@ -20,6 +20,7 @@ autocmd! bufwritepost $DOTFILES/vim/plugs.vim PlugInstall
|
||||||
|
|
||||||
" Quickly open a markdown buffer for scribble
|
" Quickly open a markdown buffer for scribble
|
||||||
map <leader>x :e ~/buffer.md<CR>
|
map <leader>x :e ~/buffer.md<CR>
|
||||||
|
map <leader>xx :e ~/projects/work/buffer.md<CR>
|
||||||
" Toggle paste mode on and off
|
" Toggle paste mode on and off
|
||||||
nmap <leader>pp :setlocal paste!<CR>
|
nmap <leader>pp :setlocal paste!<CR>
|
||||||
|
|
||||||
|
@ -61,10 +62,10 @@ nnoremap <leader>k :Rg<CR>
|
||||||
"" Fugitive
|
"" Fugitive
|
||||||
nnoremap <leader>/ :Git<CR>
|
nnoremap <leader>/ :Git<CR>
|
||||||
nnoremap <leader>\ :0Git<CR>
|
nnoremap <leader>\ :0Git<CR>
|
||||||
nnoremap <leader>Gd :Gvdiffsplit<CR>
|
nnoremap <leader>d :Gvdiffsplit<CR>
|
||||||
nnoremap <leader>Gb :Git blame<CR>
|
nnoremap <leader>b :Git blame<CR>
|
||||||
nnoremap <leader>Gp :Git push<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>Gc :Git commit<CR>
|
||||||
nnoremap <leader>Gpf :Git push --force-with-lease<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>f :History<CR>
|
||||||
map <leader>T :BTags<CR>
|
map <leader>T :BTags<CR>
|
||||||
map <leader>t :Tags<CR>
|
map <leader>t :Tags<CR>
|
||||||
map <leader>l :Lines<CR>
|
" map <leader>l :Lines<CR>
|
||||||
map <leader>c :CtrlPQuickfix<CR>
|
" FIXME: Not using CtrlP anymore, replace this with fzf
|
||||||
|
""map <leader>c :CtrlPQuickfix<CR>
|
||||||
map <leader>s :Snippets<CR>
|
map <leader>s :Snippets<CR>
|
||||||
map <leader>; :Commands<CR>
|
map <leader>; :Commands<CR>
|
||||||
map <leader>m :Maps<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>
|
vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
|
||||||
|
|
||||||
nnoremap K :exe "Rg " . expand("<cword>")<cr>
|
nnoremap K :exe "Rg " . expand("<cword>")<cr>
|
||||||
|
autocmd FileType python nnoremap T :Pytest function --pdb<CR>
|
||||||
|
|
||||||
" Ultisnips
|
" Ultisnips
|
||||||
map <Leader>ue :UltiSnipsEdit<cr>
|
map <Leader>ue :UltiSnipsEdit<cr>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user