How do you return from 'gf' in Vim

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:

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

  • 我使用Ctrl-O


    I frequently use Ctrl-6 for this.

    It's handy because it allows me to quickly jump back and forth between the two files.


    You might want to use CTRL-W gf to open the file in a new tab.

    You can close the newly opened file as always with :bd , or use CTRL-6 and other usual ways of changing buffers.

    链接地址: http://www.djcxy.com/p/49478.html

    上一篇: Vim中的右边距

    下一篇: 你如何从Vim的'gf'返回