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