home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.editors
- Path: sparky!uunet!mcsun!sun4nl!sci.kun.nl!cs.kun.nl!hansm
- From: hansm@cs.kun.nl (Hans Mulder)
- Subject: Re: How to store tabstop in vi permanently??
- Message-ID: <BxLpMx.FD3@sci.kun.nl>
- Sender: news@sci.kun.nl (NUnet News Owner)
- Organization: University of Nijmegen, The Netherlands
- References: <1992Nov11.200142.5189@b30.ingr.com> <1992Nov12.000116.23736@kpc.com>
- Date: Thu, 12 Nov 1992 11:37:44 GMT
- Lines: 55
-
- In <1992Nov12.000116.23736@kpc.com> hollasch@kpc.com (Steve Hollasch) writes:
- > I strongly recommend that you leave tabstops at the default 8 spaces,
- >since the convention for printers, tty devices, and just about everything
- >else in the world interprets a tab character as 8 spaces.
-
- Agreed wholeheartedly.
-
- > Instead, change the "shiftwidth" setting in vi to whatever indentation
- >level you want (I use 4). Then you use ^T and ^D in vi to indent and
- >unindent, respectively.
-
- > To do this, you can either include
-
- > setenv EXRC "set sw=4"
-
- Shouldn't that be EXINIT?
-
- [ For those of use who use the One True Shell, the syntax is
-
- EXINIT="set sw=4"; export EXINIT
-
- and the file is named .profile .]
-
- >or you can create a file called .exrc in your home directory with the line
-
- > set sw=4
-
-
- If you insist on using the TAB key to indent, add a line looking somewhat like:
-
- map! ^V ^T
-
- What you actually type is:
-
- m a p ! space ctrl-V ctrl-V ctrl-V tab space ctrl-V ctrl-T
-
- This makes the TAB key behave like ^T in input mode.
- Type ctrl-V tab to get a real tab if you need one.
-
- >I recommend the .exrc file, because it's much easier to add macros and other
- >settings to this file.
-
- Agreed.
-
- >vi will use this file unless there's a .exrc file in the current directory
- >(so you can have other vi settings for a certain directory).
-
- Are you sure? Most versions of vi read both the .exrc file in the home
- directory, and the one in the current directory (even if the current
- directory IS the home directory).
-
- --
- Hope this helps,
-
- Hans Mulder hansm@cs.kun.nl
-