home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / editors / 2728 < prev    next >
Encoding:
Text File  |  1992-11-12  |  2.0 KB  |  67 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: How to store tabstop in vi permanently??
  5. Message-ID: <BxLpMx.FD3@sci.kun.nl>
  6. Sender: news@sci.kun.nl (NUnet News Owner)
  7. Organization: University of Nijmegen, The Netherlands
  8. References: <1992Nov11.200142.5189@b30.ingr.com> <1992Nov12.000116.23736@kpc.com>
  9. Date: Thu, 12 Nov 1992 11:37:44 GMT
  10. Lines: 55
  11.  
  12. In <1992Nov12.000116.23736@kpc.com> hollasch@kpc.com (Steve Hollasch) writes:
  13. >    I strongly recommend that you leave tabstops at the default 8 spaces,
  14. >since the convention for printers, tty devices, and just about everything
  15. >else in the world interprets a tab character as 8 spaces.
  16.  
  17. Agreed wholeheartedly.
  18.  
  19. >    Instead, change the "shiftwidth" setting in vi to whatever indentation
  20. >level you want (I use 4).  Then you use ^T and ^D in vi to indent and
  21. >unindent, respectively.
  22.  
  23. >    To do this, you can either include
  24.  
  25. >        setenv EXRC "set sw=4"
  26.  
  27. Shouldn't that be EXINIT?
  28.  
  29. [ For those of use who use the One True Shell, the syntax is
  30.     
  31.     EXINIT="set sw=4"; export EXINIT
  32.  
  33. and the file is named .profile .]
  34.  
  35. >or you can create a file called .exrc in your home directory with the line
  36.  
  37. >        set sw=4
  38.  
  39.  
  40. If you insist on using the TAB key to indent, add a line looking somewhat like:
  41.  
  42.     map! ^V        ^T
  43.  
  44. What you actually type is:
  45.  
  46.     m a p ! space ctrl-V ctrl-V ctrl-V tab space ctrl-V ctrl-T 
  47.  
  48. This makes the TAB key behave like ^T in input mode.
  49. Type ctrl-V tab to get a real tab if you need one.
  50.  
  51. >I recommend the .exrc file, because it's much easier to add macros and other
  52. >settings to this file.
  53.  
  54. Agreed.
  55.  
  56. >vi will use this file unless there's a .exrc file in the current directory
  57. >(so you can have other vi settings for a certain directory).
  58.  
  59. Are you sure?  Most versions of vi read both the .exrc file in the home
  60. directory, and the one in the current directory (even if the current
  61. directory IS the home directory).
  62.  
  63. --
  64. Hope this helps,
  65.  
  66. Hans Mulder            hansm@cs.kun.nl
  67.