home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!netxcom!jwc
- From: jwc@netxcom.netx.com (Jeff Comer)
- Newsgroups: comp.unix.misc
- Subject: Re: how to return to exactly the same editing spot in vi (not '')
- Message-ID: <1415@netxcom.netx.com>
- Date: 15 Dec 92 21:17:22 GMT
- Organization: The Chaos Bobs
- Lines: 18
-
- tony2@prefect.cc.bellcore.com (gozdz,antoni s) writes:
- >A simple question about vi: when I want to return
- >quickly to the previous edited spot and use '',
- >the cursor returns to the beginning of the line;
- >is there a command (simple! like '') that would return
- >me to the exact spot (word, character) last edited on
- >that line?
-
- Use the backquote (`) instead of forward quote. Edit something, move around
- a little, and then try it. It works. A key sequence I often use is -
-
- ma mark this spot to letter a
- <do some stuff>
- `a puts me right back where I was.
-
- Now if vi could just remember those marks after editing another file....
-
- -JC
-