bind 'gb' to git-blaming the current line
This commit is contained in:
parent
801ab467d6
commit
175459afcd
10
vim/.vimrc
10
vim/.vimrc
@ -184,6 +184,13 @@
|
|||||||
:%s/static /static\n/
|
:%s/static /static\n/
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! GitBlame()
|
||||||
|
let l:filename = expand('%')
|
||||||
|
let l:line_number = line('.')
|
||||||
|
execute 'silent !git blame -L ' . l:line_number . ',' . l:line_number . ' ' . l:filename
|
||||||
|
redraw!
|
||||||
|
endfunction
|
||||||
|
|
||||||
" --------------
|
" --------------
|
||||||
" ### REMAPS ###
|
" ### REMAPS ###
|
||||||
" --------------
|
" --------------
|
||||||
@ -233,6 +240,9 @@
|
|||||||
" Tagbar_plugin:
|
" Tagbar_plugin:
|
||||||
nmap <C-W>m :TagbarToggle<CR>
|
nmap <C-W>m :TagbarToggle<CR>
|
||||||
|
|
||||||
|
" Misc:
|
||||||
|
nnoremap gb :call GitBlame()<CR>
|
||||||
|
|
||||||
"------------------
|
"------------------
|
||||||
" ### VARIABLES ###
|
" ### VARIABLES ###
|
||||||
"------------------
|
"------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user