🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Rob Gabbard Fri, 22 Jan 1993 19:26
Help : Need to map TAB to # of spaces in VI
#2901
Author: Rob Gabbard
Date: Fri, 22 Jan 1993 19:26
14 lines
1257 bytes
When I hit TAB in VI I want it to simply insert three spaces instead of an
actual TAB. I know I can set ts=3 and shiftwidth=3, etc. but I simply don't
want TABs in my file.  I even defined a macro that substitued all TABs with three spaces (with the above settings) but this caused all sort of strange visual effects for obvious reasons.  Is there a way to do this ?

Thanks in advance

-- 
******************************************************************************
Rob Gabbard, SDRC                 * All statements and opinions are my own. My
Cincinnati, OH                    * employer disagrees with most of what I say
rob.gabbard@sdrc.com              * anyway.
******************************************************************************
"Life goes by pretty darn fast, if you don't stop to take a look around, you
 might miss something." - Ferris Bueller
Re: Help : Need to map TAB to # of spaces in VI
#2916
Author: Hans Mulder
Date: Mon, 25 Jan 1993 12:10
25 lines
1494 bytes
In <538@heimdall.sdrc.com> rob.gabbard@sdrc.com (Rob Gabbard) writes:

>When I hit TAB in VI I want it to simply insert three spaces instead of an
>actual TAB. I know I can set ts=3 and shiftwidth=3, etc. but I simply don't
>want TABs in my file.  I even defined a macro that substitued all TABs with three spaces (with the above settings) but this caused all sort of strange visual effects for obvious reasons.  Is there a way to do this ?

How about:

set ts=666 shiftwidth=3
map ^V^I ^T
"    ^ you need to type two or three control-Vs here

This does more or less what you asked, except that it makes TAB at the
start of the line go to a multiple of three, even if it didn't start
on one.  And you still get an actual TAB if you ever reach column 666.

I'd normally use a smaller number than 666, just in case I'd ever be
editing a file that contained actual TABs, but you seem to be creating
excessively long lines.  Could you maybe set wm=8 when editing UseNet
articles?  Thanks.

--
Hope this helps,

Hans Mulder		hansm@cs.kun.nl
Re: Help : Need to map TAB to # of spaces in VI
#2930
Author: Hans Mulder
Date: Tue, 26 Jan 1993 10:32
11 lines
626 bytes
I wrote:

>set ts=666 shiftwidth=3
>map ^V^I ^T

That should of course have been:

>map! ^V^I ^T
>"    ^ you need to type two or three control-Vs here

HansM
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads