gx and g<
Open URLs and recall command output.
gx opens the URL or filename under cursor in the system handler (browser/etc.). g< re-displays the output of the last :command โ handy when a long message scrolled past.
gx and g<
Two small g commands worth knowing โ both solve real problems.
gx โ Open URL
gx on a URL or file path passes it to the system's default opener (open on macOS, xdg-open on Linux, cmd /c start on Windows). Browsers open URLs; PDFs open in PDF readers; image files open in image viewers.
g< โ Re-show Last Output
g< reopens the message area showing the output of the last Ex command โ handy when a :registers or :set all listing scrolled past faster than you could read.
Watch
- ๐บ #0493 :set fdm=indent โ Fold by Indent (not yet published)
- ๐บ #0494 :set fdm=syntax โ Fold by Syntax (not yet published)
See also: The {key:g} Family