Hi Gary, On Fri, 11 Aug 2006 13:20:15 -0700 Gary Johnson <[EMAIL PROTECTED]> wrote:
> On 2006-08-10, Eddy Zhao <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Very often, I open a lot of files to edit. When I exiting vim, vim > > prompt me to save every file which contain changes not saved yet. > > So, > > > > - Is there plugin that could highlight the > > changed-yet-not-saved-lines (possibly with yellow background), so > > that I could easily locate and check those changes and decide > > whether to save it or not. > > > > - Furthermore, is there plugin that could highlight the > > changed-and-saved-lines in a vim session in the file (possibly with > > green background), so that I could easily audit all changes of a > > file in a vim edit session. > > This command was posted by Piet Delport a few years ago. I use it > all the time. > > command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis | > wincmd p | diffthis > > Gary I can see why you use this all the time. BRILLIANT! It should certainly be a tip on vim.org if it isn't already!! I just threw this in my .vimrc and I'll too be using it all the time. (I used :command! though (note the !)) thanks, -- Mark