Summary to "<tab> to space under vi" -- from original poster
Doug Schwartz
dougs at sequent.UUCP
Sat Jan 30 04:24:43 AEST 1988
In article <465 at gordon.UUCP>, kelvin at gordon.UUCP (Kelvin Lam) writes:
...
> Work arounds:
> 3. Re-map <tab> key to insert n-<space>.
> Note for method 2 and 3:
> This isn't what I want and it won't get the desired result
> because not all <tab>'s can be replace by 8 spaces.
> Alignment problem, you know.
I must be missing something here. I thought you wanted to be able to
insert N spaces when you pressed the Tab key while in {insert/open/append}
mode in vi. If so, this suggestion will always work (put it in your .exrc
file):
:map!<sp>^V^V<tab>^V^V<sp><sp><sp><sp><sp><sp><sp><sp>
where:
<sp> is a space
<tab> is a tab
^V is control-v
Note that this assumes you are using vi on the .exrc file.
The ^V^V combination is needed, since the first one escapes
the second one which in turn escapes the <tab> or <sp>'s.
If this isn't what you want, tell me where I am amiss.
Now if you use an advanced editor, such as emacs, you could
just:
(setq tab-width 8)
--
Doug Schwartz
Sequent Computer
Beaverton, Oregon
tektronix!ogcvax!sequent!dougs
More information about the Comp.unix.questions
mailing list