Read shell output into the buffer
:read !printf "ready\n"
Example
Normal mode. Only line: header. Shell supports printf.
header- :read !printf "ready\n"<CR> Insert shell output below header · new line: ready
header
readyDetails & Vim help
Insert shell command output below the current line.
Bring generated text into a file without a clipboard round trip.
Vim runs the command through its configured shell. 'shellredir' determines whether error output is included. This example uses printf.
Try it in Vim
- Place the cursor on the line that should precede the output.
- Run :read !printf "ready\n"<CR>.
- Review the inserted line.