diff --git a/doc/fugitive.txt b/doc/fugitive.txt index a4944a1..7373d08 100644 --- a/doc/fugitive.txt +++ b/doc/fugitive.txt @@ -170,10 +170,12 @@ that are part of Git repositories). [count]th first grandparent (like HEAD~[count]), or P to reblame at that commit's [count]th parent (like HEAD^[count]). Press o or O to open up that commit - in a horizontal of vertical split. Pressing q will - close the blame buffer, and pressing gq will close the - blame buffer and return the targeted window to the - work tree version. + in a horizontal of vertical split, or i to close the + blame window and open the commit in place of the + original file. Pressing q will close the blame + buffer, and pressing gq will close the blame buffer + and return the targeted window to the work tree + version. :[range]Gblame [flags] Run git-blame on the given range. diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index cbea6ab..fa7e205 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1488,6 +1488,7 @@ function! s:Blame(bang,line1,line2,count,args) abort nnoremap :exe BlameJump('') nnoremap P :exe BlameJump('^'.v:count1) nnoremap ~ :exe BlameJump('~'.v:count1) + nnoremap i :exe "exe 'norm q'".Edit("edit", 0, matchstr(getline('.'),'\x\+')) nnoremap o :exe Edit((&splitbelow ? "botright" : "topleft")." split", 0, matchstr(getline('.'),'\x\+')) nnoremap O :exe Edit("tabedit", 0, matchstr(getline('.'),'\x\+')) syncbind