vile
[Top][All Lists]
Advanced

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

Re: [vile] backup-style in submode definition


From: Thomas Dickey
Subject: Re: [vile] backup-style in submode definition
Date: Sun, 3 Apr 2011 19:20:58 -0400 (EDT)

On Sun, 3 Apr 2011, address@hidden wrote:

It seems that for this particular setting it makes sense to have a global
value that is inherited unless explicitly set on a buffer?

That's what buffer modes do.  There's a "global" value which is applied to
buffers that don't have a "local" value set.  The "global" that I referred
to before is a different type of global (also referred to in vile as "universal").

Soon's I dig my way out of a hole I'm stuck in with ncurses, I'll spend 3-4 days and cleanup my backlog for vile (this one is small).

For right now I've used the '+' command flag when running vile from mutt in
order to disable backups when sending mail.

On Sun, Apr 03, 2011 at 06:41:07PM -0400, Thomas Dickey wrote:
On Sun, 3 Apr 2011, address@hidden wrote:

I have a few settings that are executed when vile is entering the 'mail'
submode.  The following works fine.

~with define-submode mail
  ts=8
  tabinsert
  wrapwords
~endwith

If the backup-style is present, like so.

~with define-submode mail
  backup-style=off
  ts=8
  tabinsert
  wrapwords
~endwith

I receive the following error:

[No match for 'backup-style']
[Illegal submode name: backup-style]

How do I set the backup-style based on the submode definition?

backup-style is a global mode, while submodes only work for buffer-modes.

Whether a mode is global-, buffer-, or window- is related to how it's
implemented in the code as well as the expected uses for it.

This particular case would be only a few lines of code to change.

Some of the global modes clearly have to be that way (for instance,
the xterm-mouse mode, which would be difficult to switch on a per-buffer
basis), while others are global because there's been no apparent reason
to make them apply differently to different buffer types.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

_______________________________________________
vile mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/vile


--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



reply via email to

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