Article View: comp.editors
Article #2916Re: Help : Need to map TAB to # of spaces in VI
From: Hans Mulder
Date: Mon, 25 Jan 1993 12:10
Date: Mon, 25 Jan 1993 12:10
25 lines
1494 bytes
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
Technical Details
Message-ID:
<C1EsI3.362@sci.kun.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!sci.kun.nl!cs.kun.nl!hansmReferences:
<538@heimdall.sdrc.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.editors Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!sci.kun.nl!cs.kun.nl!hansm From: hansm@cs.kun.nl (Hans Mulder) Subject: Re: Help : Need to map TAB to # of spaces in VI Message-ID: <C1EsI3.362@sci.kun.nl> Sender: news@sci.kun.nl (News owner) Nntp-Posting-Host: zeus.cs.kun.nl Organization: University of Nijmegen, The Netherlands References: <538@heimdall.sdrc.com> Date: Mon, 25 Jan 1993 12:10:51 GMT Lines: 25