vi help needed

rad at MITRE-BEDFORD.ARPA rad at MITRE-BEDFORD.ARPA
Wed Jul 25 23:09:00 AEST 1984


>When I use vi one of the first things I usually do is execute the command
>
>               :map g :.=^VCR
>
>so that by hitting the g key it tells me what line I'm on.  I would like
>to have my editor come up with this command in place.  Can anybody
>tell me how to do this?  ...

  Place the same command (without the colon) in the file .exrc in your
home directory.  You can put a lot of commands in there (set's, map's,
abbrev's, etc.) to save time when you start up.  If you don't like
your standard setup in your .exrc file (e.g., you might want different
settings when editing text than when editing programs), you can set
the environmental variable EXINIT to make vi initialize from some
other file:

   setenv EXINIT "source .differentexrc"

  By the way, typing control-G does the same thing as your map, in a
considerably more verbose fashion.

Dick Dramstad
rad at mitre-bedford



More information about the Comp.unix mailing list