DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Jump between Files in vim


Open file at cursor

  • Open in the same window: gf

  • Open in a new window: f

  • Open in a new tab: gf

You can use relative path. For example, when you put cursor on any character of "dir1/file1" and press gf, the file "file1" under folder "dir1" in CWD will be opened.

Ref: http://vim.wikia.com/wiki/Open_file_under_cursor

Jump back from "gf"

  • Jump back: or :bf

  • Jump back and forth between two files:

Ref: http://stackoverflow.com/questions/133626/how-do-you-return-from-gf-in-vim



Published

Jan 2, 2014

Last Updated

Jan 2, 2014

Category

Tech

Tags

  • Vim 92

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor