[Linux-disciples] Re: Making ":unset [varname]" = ":set no[varname]" (fwd)

Stephen R Laniel steve at laniels.org
Mon Jun 27 16:29:55 EDT 2005


So there's this ...

----- Forwarded message from GI <gautam at math.uchicago.edu> -----

Date: Mon, 27 Jun 2005 15:23:50 -0500
From: GI <gautam at math.uchicago.edu>
To: vim-dev at vim.org
Subject: Re: Making ":unset [varname]" = ":set no[varname]"
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.4.2.1i

On Mon, Jun 27, 2005 at 04:02:34PM -0400, Stephen R Laniel wrote:

> I'd like to write a (presumably small) vim patch so that
> 
> :unset [varname]
> 
> does the same thing as
> 
> :set no[varname]
> 
> assuming [varname] is a valid vim variable. But I've been looking
> through the source, and I'm not clear on where I'd include the patch.
> Can someone give a first-time vim developer a kick in the right
> direction?

Why do you need to patch vim for this? You can easily write a vim script
to do the same. Something like (untested)

    :command -nargs=1 Unset exec 'set no'.<q-args>

should do the trick. Only disadvantage is that you will have to call
your command :Unset instead of :unset. If you decide you *really* can't
live with that, try

    :cab unset Unset

in addition to the above. (Ofcourse using an abbreviation for unset has
it's disadvantages ...)

:)

GI

-- 
If your wife wants to learn to drive, don't stand in her way.

----- End forwarded message -----

-- 
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20050627/f6e08cb6/attachment.pgp


More information about the Linux-disciples mailing list