vile
[Top][All Lists]
Advanced

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

Re: [vile] automatically setting tabstops


From: Thomas Dickey
Subject: Re: [vile] automatically setting tabstops
Date: Wed, 11 Jan 2012 18:46:53 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Jan 11, 2012 at 02:09:41PM -0800, eclectic 923 wrote:
> I've looked at the mailing list archive, and googled. I can't find the 
> answer, and can't believe this hasn't come up before...
> 
> In vim, a line like the following in file foo.c will automatically set the 
> tabstop to 4 when editing foo.c:
> 
> /* vim:set tabstop=4: */
> 
> Something similar exists for emacs.
> 
> Maybe it's obvious, and I just don't get it, but there should be a way to do 
> this with vile?
> 
> Before I try to invent a way to do this... hasn't this been done before, and 
> what's the solution?

sure - vile's supported the modeline feature for a while.
Both vile and vim recognize their own "vile" or "vim" keywords there,
as well as "vi".  The default is false, but adding this to your
.vilerc will enable it:

        set modeline

The "set" keyword isn't used though (the intent of the modeline
is to set modes).  As I recall it, that's the way vi does it, while
vim makes the "set" optional.  (If I'm wrong, I should fix that...)

-- 
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]