How do you return from 'gf' in Vim
Asked 07 September, 2021
Viewed 3K times
  • 57
Votes

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.

11 Answer