home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / editors / 3025 < prev    next >
Encoding:
Text File  |  1992-12-12  |  1.4 KB  |  36 lines

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