home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / editors / 3294 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.4 KB  |  38 lines

  1. Newsgroups: comp.editors
  2. Path: sparky!uunet!mcsun!sun4nl!sci.kun.nl!cs.kun.nl!hansm
  3. From: hansm@cs.kun.nl (Hans Mulder)
  4. Subject: Re: Help : Need to map TAB to # of spaces in VI
  5. Message-ID: <C1EsI3.362@sci.kun.nl>
  6. Sender: news@sci.kun.nl (News owner)
  7. Nntp-Posting-Host: zeus.cs.kun.nl
  8. Organization: University of Nijmegen, The Netherlands
  9. References: <538@heimdall.sdrc.com>
  10. Date: Mon, 25 Jan 1993 12:10:51 GMT
  11. Lines: 25
  12.  
  13. In <538@heimdall.sdrc.com> rob.gabbard@sdrc.com (Rob Gabbard) writes:
  14.  
  15. >When I hit TAB in VI I want it to simply insert three spaces instead of an
  16. >actual TAB. I know I can set ts=3 and shiftwidth=3, etc. but I simply don't
  17. >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 ?
  18.  
  19. How about:
  20.  
  21. set ts=666 shiftwidth=3
  22. map ^V^I ^T
  23. "    ^ you need to type two or three control-Vs here
  24.  
  25. This does more or less what you asked, except that it makes TAB at the
  26. start of the line go to a multiple of three, even if it didn't start
  27. on one.  And you still get an actual TAB if you ever reach column 666.
  28.  
  29. I'd normally use a smaller number than 666, just in case I'd ever be
  30. editing a file that contained actual TABs, but you seem to be creating
  31. excessively long lines.  Could you maybe set wm=8 when editing UseNet
  32. articles?  Thanks.
  33.  
  34. --
  35. Hope this helps,
  36.  
  37. Hans Mulder        hansm@cs.kun.nl
  38.