Blog

Brandon Rozek

Photo of Brandon Rozek

Software Developer, Researcher, and Linux Enthusiast.

Terminal Output in Vim

Published on

In Vim you can output the result of a command below your cursor by using :r!.

Examples:

Hello World

:r! echo Hello World

The current timestamp

:r! echo "[$(date '+\%Y-\%m-\%d \%H:\%M:\%S')]"

Outputs: [2021-06-18 16:13:19]

Reply via Email

Have you published a response to this? :