VI tabs, termcap solution?, new Summary/tutorial on the way
Dan Smith, Social Mammal...
daniels at well.UUCP
Wed Feb 3 11:57:29 AEST 1988
>Subject: Re: <tab> to space under vi, VI SUMMARY COMING SOON...
>References: <462 at gordon.UUCP> <239 at unicom.UUCP> <6659 at agate.BERKELEY.EDU> <559 at riddle.UUCP>
>Organization: Whole Earth 'Lectronic Link, Sausalito, CA
In article <559 at riddle.UUCP> domo at riddle.UUCP (Dominic Dunlop) writes:
>Sender:
>
>
>In article <6659 at agate.BERKELEY.EDU> shipley at web5b.berkeley.edu.UUCP (Peter Shipley) writes:
>>In article <239 at unicom.UUCP> daniel at unicom.UUCP (Dan "I want to Ski Tam!" Smith) writes:
>>}Is there a way to force 'vi' editor to insert appropreiate number of spaces
>>}when <tab> key is hit?
>>What is wrong with:
>>
>> :%!unexpand
>
>[Hope I've managed to preserve correct attributions in paring that down.]
>--
>Dominic Dunlop
>domo at sphinx.co.uk domo at riddle.uucp
Nope. daniel at unicom (one of my other accounts) never said that. No
big whoop, though :-)
Here's an area I don't know a lot about, so bear with me... what
about having a termcap entry invoked when you want to solve this
"tabs-to-spaces" problem? The termcap entry (ta <str>) would be just like
the one you usually use, except it would inform vi that your terminal really
handles tabs as spaces. ...hope I'm not barking up the wrong tree
with this one! The advantage of it is that it can be implemented easily
when going into vi (a csh alias could set the terminal type, and
go into vi), and you don't have to think about it when in vi. Two
disadvantages are that your files will be a bit bigger, and will behave
a little differently in vi for cursor movements (this isn't really
a disadvantage, but it is different). I am guessing at this, with
a 4.2 BSD programmers manual at my side (helps my guessing :-). Tell
me politely if I'm wrong...
I got a good deal of response from all over about my summary/
tutorial on macros. I'm working on an update, so I'd like to get some
feedback/suggestions from you as to what types of things you
want to see in it. I would love to get some uuencoded .exrc files
from people. One quick note: A lot of terminals don't have a home
key... a control caret (^^, often is control shift 6) usually
generates the same key as a home key would. If you unmap it in
your .exrc, you can switch off between files, and cut
and paste easily via the named and numbered buffers. For those who
don't have USENET access, your shar is coming... if you still
don't get it in a few days, send me a better address. ucbvax,
ptsfa, well, lll-* are good ones.
dan
dan smith, island graphics, marin co., ca|"A picture is worth a million pixels"
uucp: ..!ucbvax!ucbcad!island!daniel | ph: (415) 491 1000 (w)|Impeach
uucp: ..!ptsfa!unicom!daniel well!daniels| 332 FAST, 332 EASY (h)| Reagan!
More information about the Comp.unix.questions
mailing list