[comp.editors] .exrc example?

eliot@phoenix.Princeton.EDU (Eliot Handelman) (10/23/89)

Could someone post an example .exrc file? I've never seen what one looks
like and I haven't (in all of 5 minutes) figured out how to set options
that don't cause a warning to be flashed for .05 seconds about how these
options don't exist.

IA80001@MAINE.BITNET (George Newell) (10/30/89)

Below is a copy of my .exrc file.


set showmode
# Setting showmode has the editor tell me what input mode I am in.

set nomesg
# Setting nomesg prevents incoming msgs so I don't get interrupted.
#   This resets to previous setting when you exit the editor.

set hardtabs=4
# Setting hardtabs to 4 means when I hit TAB key, my indentation is 4.

set tabstops=4
# Setting tabstops is similar to hardtabs.

set report=3
# Setting report=3 means any change of 3 or more lines is reported to me.

set autoindent
# Setting autoindent means that next line of input indents to same level
#   as the current line.  This is good for structured programming.

set readonly
# Setting this defaults program mode to Read Only.  I can still write to
#   the file but I must use the :w! command and then :q separately.
#   This prevents accidentally writing to the file when I didn't want to.

set shiftwidth=4
# Setting this tells me how many spaces back I go when doing a backtab.

set nowrapscan
# Setting this tells editor to stop all searches at the end of the file
#   instead of wrapping around to the beginning of file.

#NOTE: you should delete all # lines as I found my .exrc file wouldn't
#      work with them included.

********************
George Newell
IA80001@MAINE.BITNET
********************

sanders@sanders.austin.ibm.com (Tony Sanders) (10/31/89)

>#NOTE: you should delete all # lines as I found my .exrc file wouldn't
>#      work with them included.

Use the double quote character like this:

" beware the modeline my son,
" with macros that bite and claws that catch.
set modeline
set terse ai sw=4 aw wa redraw optimize
"set wm=10 ic

I found it annoying at first that it wasn't the "standard" (and I use
the term loosely, as do all computer manufacturers :-) character "#".

-- sanders

allbery@NCoast.ORG (Brandon S. Allbery) (10/31/89)

As quoted from <2238IA80001@MAINE> by IA80001@MAINE.BITNET (George Newell):
+---------------
| set hardtabs=4
| # Setting hardtabs to 4 means when I hit TAB key, my indentation is 4.
| 
| set tabstops=4
| # Setting tabstops is similar to hardtabs.
+---------------

"hardtabs" means that the terminal has tabs set every N spaces.  "tabstops"
means that ex/vi should treat a tab as N spaces.  The difference is that
"hardtabs" tells ex/vi when to use a tab to position the cursor when writing
to the terminal screen; it does *not* affect the meaning of a tab in a file.

++Brandon
-- 
Brandon S. Allbery:  allbery@NCoast.ORG, BALLBERY (MCI Mail), ALLBERY (Delphi)
uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu bsa@telotech.uucp
*(comp.sources.misc mail to comp-sources-misc[-request]@backbone.site, please)*
*Third party vote-collection service: send mail to allbery@uunet.uu.net (ONLY)*
>>>	 Shall we try for comp.protocols.tcp-ip.eniac next, Richard?	    <<<

ecarroll@vax1.tcd.ie (Eddy Carroll) (11/09/89)

In article <PCG.89Nov1163541@emerald.cs.aber.ac.uk>, pcg@emerald.cs.aber.ac.uk
(Piercarlo Grandi) writes:
>
> Bottom line: leave alone hardtabs and tabstops, and set shiftwidth to
> the indentation you like, and use ^T and ^D in input mode to indent, not
> the physical tab key.

This is fine, but given that TAB is a nice big convenient key on most keyboards
(much more so than ^T), is there any way to remap TAB to ^T in input mode? The
obvious "map! ^V^I ^V^T" doesn't work (the ^I is echoed as a real tab, and
treated as white space).
-- 
Eddy Carroll             ----* Genuine MUD Wizard  | "You haven't lived until
INTER: ecarroll@vax1.tcd.ie                        |    you've died in MUD!"
 UUCP: {..uunet}!mcvax!ukc!vax1.tcd.ie!ecarroll    |  -- Richard Bartle