home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.editors
- Path: sparky!uunet!think.com!spool.mu.edu!umn.edu!csus.edu!netcom.com!alm
- From: alm@netcom.com (Andrew Moore)
- Subject: Re: multiple file editing in VI
- Message-ID: <1992Dec13.031358.28041@netcom.com>
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- References: <Bz1y7H.BEA@sci.kun.nl>
- Date: Sun, 13 Dec 1992 03:13:58 GMT
- Lines: 25
-
- In article <Bz1y7H.BEA@sci.kun.nl> jeroenh@sci.kun.nl (Jeroen Huinink) writes:
- >Hello,
- >
- >When editing multiple files in vi (using 'vi *.c') you can get to the next
- >file using :n and you can get to the first file with :rew. What I would
- >like to do is skip to the previous file or to a file with a certain number
- >without having to remember the filename or doing :rew and a number of times
- >:n.
- >
- >Can someone enlighten me?
-
- The following doesn't answer your question directly, but maybe it will
- help...
-
- I belive you can toggle back and forth between two files with the ex
- command
- :e#
- And if you are editting C language files, I presume you know about
- ctags? For example, after creating a tags file, use CTL-] (i.e., press
- the ] key while holding down the CTL key) to jump to the file defining
- the function under the cursor. To return, use CTL-^. If the version of
- vi you use has tag stacks (e.g., I don't think elvis has them yet),
- you can get around very well this way.
- Related commands are ":ta" ":pop," and from the command line "vi -t tag."
- -Andrew Moore <alm@netcom.com>
-