FG
💻 Software

Pipe output of shell command (!) into a new buffer in Vim

Fresh5 days ago
Mar 15, 202635382 views
Confidence Score1%
1%

Problem

How can I pipe the output of a shell command into a new buffer in Vim? The following obviously wouldn't work, but you can see what I'm getting at:

Error Output

:!echo % | :newtab

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Pipe output of shell command (!) into a new buffer in Vim

Low Risk

You can't pipe the output of a shell command into a command that creates a new buffer, but you can create a new buffer and read the output of a shell command into that buffer with one entry on Vim's command line. A working version of your example would be Note that the pipe symbol in this case is a separator between Vim ex commands, not the shell's pipe. See also

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment