Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion existance of :diffoff
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jürgen Krämer  
View profile  
 More options Apr 19 2012, 2:13 am
From: Jürgen Krämer <jottka...@googlemail.com>
Date: Thu, 19 Apr 2012 08:13:53 +0200
Local: Thurs, Apr 19 2012 2:13 am
Subject: Re: existance of :diffoff

Hi,

Bee schrieb:

> 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! ?

  :echo exists(':diffoff')

> And is this function sufficient?

Additionally check if the window is really in diff mode:

  function! DiffOff()
    if exists(':diffoff') == 2
      windo if &diff | set nodiff foldcolumn=0 noscrollbind nowrap scrollopt-=hor | endif
    else
      diffoff!
    endif
    close
  endf

Regards,
J rgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.