Hi David,

On 6/29/06, David Fishburn <[EMAIL PROTECTED]> wrote:


> -----Original Message-----
> From: Hari Krishna Dara [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 29, 2006 2:53 PM
> To: vim@vim.org
> 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.


Starting with Vim7, you don't need the above user-defined command.
Instead you can use one of the following commands:

  :diffoff
  :diffoff!

- Yegappan

Reply via email to