My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes  
1
2
3
4
5
6
7
8
9
10
11
" vimtip # 1030

function! s:DiffWithSaved()
let filetype=&ft
diffthis
vnew | r # | 1delete_
diffthis
exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype
nnoremap <buffer> q :bw<cr>
endfunction
com! DiffSaved call s:DiffWithSaved()

Change log

r178 by luc.hermitte on May 16, 2010   Diff
- misc [diffsaved]: new mapping to
automatically quit the diff scratch buffer
on 'q'
Go to: 
Sign in to write a code review

Older revisions

r130 by luc.hermitte on Oct 27, 2008   Diff
- updating SVN keywords
r128 by luc.hermitte on Oct 27, 2008   Diff
- Create lh-misc-stuff
All revisions of this file

File info

Size: 254 bytes, 11 lines

File properties

svn:keywords
Date Author Revision Id
Powered by Google Project Hosting