How do you return from 'gf' in Vim

JayG picture JayG · Sep 25, 2008 · Viewed 55.3k times · Source

I am using Vim for windows installed in Unix mode. Thanks to this site I now use the gf command to go to a file under the cursor.

I'm looking for a command to either:

  1. return to the previous file (similar to Ctrl+T for ctags), or
  2. remap gf to automatically launch the new file in a new window.

Answer

jop picture jop · Sep 25, 2008

I use Ctrl-O