[net.unix] vi help needed

jlh@loral.UUCP (07/23/84)

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?  I'm running 4.2BSd, and I don't know what
version of vi I have.  Thanks in advance.
					Jim

ciampa@wivax.UUCP (Robert Ciampa) (07/24/84)

Have you tried contol-g to get the line number?
It also gives total lines in the file and a percentage
of how deep you are in the file...

-- 
Robert A. Ciampa {apollo, cadmus, decvax, linus, masscomp}!wivax!ciampa
                  Wang Institute (617) 649-9731 x372

rad@MITRE-BEDFORD.ARPA (07/25/84)

>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@mitre-bedford

kae@ihuxl.UUCP (Alan Edwards) (07/30/84)

<eat it eat it eat it>

  How about trying this:

	:map g ^G

  Control-G will give you what line you're on along with some other
  goodies.
-- 

 -Alan Edwards
  IX 1C-423 x0879
  (ihuxl!kae)