Using Vim-fugitive plugin I open a commit with
:Gedit HEAD~5
The buffer looks like this:
tree a75d4eea2207e408db6343a4869274b701b42135
parent 7fa89fec125ce60a341f7c37dd769a8a31c49359
author Takahiro Yoshihara <[email protected]> Tue Feb 21 09:07:51 2017 +0900
committer Takahiro Yoshihara <[email protected]> Sun Mar 19 18:16:51 2017 +0900
Fix incorrect matching in buffer mode with by_filename (#346)
diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim
index 6558939..05196ae 100644
--- a/autoload/ctrlp.vim
+++ b/autoload/ctrlp.vim
@@ -2384,7 +2384,7 @@ endf
fu! s:matchbuf(item, pat)
let bufnr = s:bufnrfilpath(a:item)[0]
let parts = s:bufparts(bufnr)
- let item = bufnr.parts[0].parts[2].s:lash().parts[3]
+ let item = s:byfname ? parts[2] : bufnr.parts[0].parts[2].s:lash().parts[3]
retu match(item, a:pat)
endf
(the diff part appears folded)
Now putting the cursor on the first line of the diff, I would like to open that diff in a vertical split vim-diff mode like :Gvdiff
(in a new tab or in the same tab below the current window) viewing the changes made to the file.
Currently issuing :Gvdiff
compares the entire commit-buffer with something weird.
Basically I would like to have the same diff-view, as I get with dv
in the :Gstatus
window.
My questions are:
- How can I open the vertical split diff on a selected file?
- How can I close that view going back to my commit buffer?
ENTER
opens the split diff view. But if closes the commit-edit buffer and there seams to be no way to open it again... (I have a mapping in place, that closes inactive fugitive-buffers)