Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2001 22:30:36 -0400
From:      parv <parv_@yahoo.com>
To:        John Fox <jjf@mind.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Expanding tabs to spaces within nvi
Message-ID:  <20010813223036.A60454@moo.holy.cow>
In-Reply-To: <20010813135928.I10559@mind.net>; from jjf@mind.net on Mon, Aug 13, 2001 at 01:59:28PM -0700
References:  <20010813135928.I10559@mind.net>

next in thread | previous in thread | raw e-mail | index | archive | help
this was, on the fateful occasion around Aug 13 16:59 -0400,
sent by John Fox                                                     
>
> Hello, Listers,
> 
> I was just reading some indentation tips on the vim homepage,
> and ran across a setting that causes vim to expand a tab into
> a sequence of spaces.  This is spiffy to me, because I like
> tabstops of 4, but when anybody else gets my code in an editor,
> it looks funky till they change their tabstop setting to match
> the original.
> 
> Does anybody know if nvi can be made to do this?  I've just
> finished reading the nvi manpage, and it appears to me that
> the answer to my question is "No", but I wanted to be sure.


if you only want to change tabstops to, say, 8, then you can do...

set ts=8

...either in command mode, or in ~/.exrc, or as EXINIT environment 
variable. if you want to change tabs to spaces, this may help you...

perl -pi -e 's#\t#        #g' <file>
 
...or, you may prefer similar substitution inside nvi.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010813223036.A60454>