On Thu, 29 Jun 2006 at 2:59pm, David Fishburn wrote:

>
>
> > -----Original Message-----
> > From: Hari Krishna Dara [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 29, 2006 2:53 PM
> > To: [email protected]
> > Subject: a question about 'diff' setting
> ...
> > Can anyone explain why and what I should do to avoid
> > this (other than remembering to run :diffoff before closing,
> > or doing a :bufdo diffoff later).
>
>
> I keep this in my vimrc:
> if v:version >= 602
>     command! -bar -bang Nodiff wincmd l <bar> only<bang> <bar> set nodiff
> noscrollbind scrollopt-=hor wrap foldcolumn=0 virtualedit=
> else
>     command! -bar Nodiff exe 'wincmd l' <bar> only <bar> set nodiff
> noscrollbind wrap foldcolumn=0 scrollopt-=hor virtualedit= <bar> let
> g:diff_msg_shown = 0
> endif
>
> I think Gary Johnson came up with it initially.
>
> Try that to see if it works.  The command! lines are on 1 line only.
>
> Dave

I use a version of this command myself, but the point is you have to
remember to use it before closing them. I often use two unnamed buffers
to diff and copy paste text from else where (say sql results) to diff.
When I close them without running my command, and later discover this
problem, I have to hunt around for the unnamed buffers that are silently
participating in the diff and get rid off them. There may be other
aspects in the way I work that get me into this diff problem, but I
haven't analyzed all.

-- 
Thanks,
Hari

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to