vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] toggle boolean settings


From: Thomas Dickey
Subject: Re: [vile] toggle boolean settings
Date: Mon, 12 Mar 2012 21:09:02 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Mar 12, 2012 at 01:33:16PM -0400, address@hidden wrote:
> Tom,
> 
> Sorry I didn't not reply in a timely manner, I was out of commission for
> a while. I'll give the macro a try, much thanks!

no problem (it's a little obscure, but basically expects a mode name without
'$', and then it glues that on the front to force vile to see it as a variable
name).
 
> Wayne
> 
> On Wed, Mar 07, 2012 at 08:49:29PM -0500, Thomas Dickey wrote:
> > On Tue, Mar 06, 2012 at 08:48:29PM -0500, Thomas Dickey wrote:
> > > On Wed, Feb 29, 2012 at 05:15:36PM -0500, Thomas Dickey wrote:
> > > > On Wed, Feb 29, 2012 at 01:51:46PM -0500, address@hidden wrote:
> > > > > Is there a way to simply negate boolean settings? If not it would be
> > > > > nice to have a feature like this:
> > > > > 
> > > > > setl !list
> > > > > or
> > > > > setl notlist
> > > > > 
> > > > > If listing is enabled it would be disabled, else enabled.
> > ...
> > 
> > here's a complete macro (still not the suggested syntax...)
> > 
> > ; generalized from ToggleList, for any boolean mode
> > store-procedure ToggleMode mode='Mode'
> >     ~local %mode
> >     setv %mode &cat '$' $1
> >     ~if &or \
> >             &seq "TRUE" &indirect %mode \
> >             &seq "FALSE" &indirect %mode
> >             setv &indirect $1 &not &indirect %mode
> >     ~else
> >             write-message "Not a boolean mode"
> >     ~endif
> > ~endm
> > 
> > -- 
> > Thomas E. Dickey <address@hidden>
> > http://invisible-island.net
> > ftp://invisible-island.net
> 
> 
> 
> > _______________________________________________
> > vile mailing list
> > address@hidden
> > https://lists.nongnu.org/mailman/listinfo/vile
> 
> 
> _______________________________________________
> vile mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/vile

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]