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/
|
||||
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 ###
|
||||
" --------------
|
||||
@ -233,6 +240,9 @@
|
||||
" Tagbar_plugin:
|
||||
nmap <C-W>m :TagbarToggle<CR>
|
||||
|
||||
" Misc:
|
||||
nnoremap gb :call GitBlame()<CR>
|
||||
|
||||
"------------------
|
||||
" ### VARIABLES ###
|
||||
"------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user