Wednesday, April 18, 2012

Re: existance of :diffoff

On 2012-04-18, Gary Johnson wrote:
> On 2012-04-18, Bee wrote:
> > I use vim on Mac, Linux, Windows with versions 6 and 7.
> >
> > :diffoff! works with version 7 but does not exist in version 6.
> >
> > Currently I do this:
> >
> > function! DiffOff()
> > if v:version < 700
> > windo set nodiff foldcolumn=0 noscrollbind nowrap scrollopt-=hor
> > else
> > diffoff!
> > endif
> > close
> > endf
> >
> > Is there a way to specifically check for the existence of :diffoff! ?
>
> if exists(":diffoff")
> ...

As Jürgen wrote, that should be

if exists(":diffoff") == 2

there and in my example.

Regards,
Gary

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: