User guide / Files and buffers

Opening files and links

Development reference · View source

g f opens what is under the cursor, or exactly what is selected.

TargetOpens
https://…, http://…, www.…The default browser. www. addresses use HTTPS.
A file pathThe file in the editor. Relative paths are matched beside the active file or explorer and at the project root. Several matches open a picker.
A Markdown link or image labelIts destination, including paths in angle brackets, in the source and in rendered ? pages
A link to #heading or file.md#headingThat heading

Inferring the target with a bare caret:

  • Surrounding Markdown wrappers and trailing prose punctuation are left out. A path at the end of a sentence ignores trailing punctuation when the literal name does not exist.
  • An inferred target stays within one buffer line.
  • An explicit selection is used exactly.

In terminal review (g f in NORMAL/review mode):

  • It reads the frozen review text, and resolves relative paths against the terminal’s latest validated directory (or its launch directory) and the project root.
  • Opening a file leaves the terminal process running. Opening a link keeps the terminal view in place.
  • A bare caret anywhere on a web link follows the whole URL across rows joined by the terminal’s automatic wrapping.
  • An explicit newline ends a link, unless a program such as Codex or Claude Code broke the link inside indented text. The link then continues onto the next row when that row is indented to the same text column and the link’s row reaches the right edge its block wraps at. A link ending before that edge, or a row starting at the left edge, is never joined.
  • Resizing the live terminal clears wrap information. An already captured review keeps its original links.

Opening by command: :open <path> (aliases :e, :edit) opens a file or directory in the active pane; see Commands for path completion.