Saturday, April 7, 2012

Re: gf - How to get back in one hop

> While editing a file, I issue the 'gf' command while the
> cursor is on a file name and the file is opened in the editor.
> I move around in the newly opened file and issue ctrl-o
> multiple times to retrace my steps back to the original file
> where I ran the 'gf' command. How can I return to the original
> file in one step?

You can try control+^ which toggles between the current file and
the alternate file (which, in this case should be the one you
used "gf" in). It might not work if you jump to other files (or
possibly move into other buffers), but for your base case, it
should do the job.

-tim


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: