tags:

views:

133

answers:

1

Hello,

I am using vim with fugitive extension http://www.vim.org/scripts/script.php?script_id=2975 It has :Gdiff command which brings you into vimdiff mode, but what is the right/quick way to close/quit vimdiff mode?

i.e. let's say I am editing file FooBar.txt under git repository, then firing up :Gdiff, review my changes in vimdiff and want to get back and continue editing FooBar.txt or any other file :)

Thanks.

UPDATE: quick combos I'm going to give a try next working days :)

"vimdiff current vs git head (fugitive extension)
nnoremap <Leader>gd :Gdiff<cr> 
"switch back to current file and closes fugitive buffer
nnoremap <Leader>gD :diffoff!<cr><c-w>h:bd<cr>
+3  A: 

/* You can execute windo set nodiff noscrollbind and then close the second window. */

Update: there is a diffoff command. Use windo diffoff, not what I wrote in previous line.

ZyX
also :diffoff! do the same, right? I was pointed to this command by Tony M. from vim_use group.
wik