I am using vim with a runaway extension . He has a command: Gdiff, which puts you in vimdiff mode, but what is the right / fast way to close / exit vimdiff mode?
That is, let's say I am editing the FooBar.txt file in the Git repository. I run: Gdiff, look at my changes in vimdiff, and then want to go back and continue editing FooBar.txt or any other file :)
UPDATE 1: I'm going to try these quick combinations the next business day :)
"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><cw>h:bd<cr>
UPDATE 2: My current mappings (closes only the comparison window!)
"vimdiff current vs git head (fugitive extension) nnoremap <Leader>gd :Gdiff<cr> "switch back to current file and closes fugitive buffer nnoremap <Leader>gD <cw>h<cw>c
Also, please help me decide if the next one should be a responder: https://stackoverflow.com/a/167298/
vim vimdiff vim-fugitive
wik Apr 24 '10 at 7:45 2010-04-24 07:45
source share