New Location

My website has moved to http://www.jasonwhaley.com. Please visit there for the latest and only remain here for legacy content.

Wednesday, May 26, 2010

Periodically VIM - gf (Goto File)

[Periodically VIM is my regular VIM tips and discoveries section, inspired by what was Daily VIM]

The Tip: gf will open the file name underneath the cursor.

Usage: Place your cursor on a piece of text or with a piece of text highlighted in visual mode where the text represents the path to a file name. use the command gf to open the file in the current buffer, ctrl-w f to open the file in a new window, or ctrl-w gf to open the file in a new tab.

What Is It Good For?: Fairly often, files will contain references to other files. Use this to quickly open those files without relying on having NERDTree running or by going to command mode to open the file.

0 comments: