home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / editors / 2721 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.8 KB  |  44 lines

  1. Newsgroups: comp.editors
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!ames!haven.umd.edu!darwin.sura.net!sgiblab!news.kpc.com!kpc!hollasch
  3. From: hollasch@kpc.com (Steve Hollasch)
  4. Subject: Re: How to store tabstop in vi permanently??
  5. Message-ID: <1992Nov12.000116.23736@kpc.com>
  6. Summary: Don't mess with tabstop, set swiftwidth instead.
  7. Sender: usenet@kpc.com
  8. Organization: Kubota Pacific Computer, Inc.
  9. References: <1992Nov11.200142.5189@b30.ingr.com>
  10. Date: Thu, 12 Nov 1992 00:01:16 GMT
  11. Lines: 31
  12.  
  13. "Ravi Parthasarathy <ravi@blore.b30.ingr.COM>" writes:
  14. | How does one change the default tabstop in vi?
  15. | presently, i am typing in :set tabstop=4 while edititng a file. I would like
  16. | to set this value and vi should come up with this tabstop everytime it is
  17. | ivoked.
  18.  
  19.     I strongly recommend that you leave tabstops at the default 8 spaces,
  20. since the convention for printers, tty devices, and just about everything
  21. else in the world interprets a tab character as 8 spaces.
  22.  
  23.     Instead, change the "shiftwidth" setting in vi to whatever indentation
  24. level you want (I use 4).  Then you use ^T and ^D in vi to indent and
  25. unindent, respectively.
  26.  
  27.     To do this, you can either include
  28.  
  29.         setenv EXRC "set sw=4"
  30.  
  31. in your .login file (I'm assuming you use csh), or you can create a file
  32. called .exrc in your home directory with the line
  33.  
  34.         set sw=4
  35.  
  36. I recommend the .exrc file, because it's much easier to add macros and other
  37. settings to this file.  vi will use this file unless there's a .exrc file in
  38. the current directory (so you can have other vi settings for a certain
  39. directory).
  40.  
  41. ______________________________________________________________________________
  42. Steve Hollasch                                   Kubota Pacific Computer, Inc.
  43. hollasch@kpc.com                                 Santa Clara, California
  44.