06/24/2026
Pipe terminal output directly to vim without creating a file
With
command | vim -
The - tells vim to read the buffer from stdin instead of opening a file.
Useful examples I use regularly
Docker stuff
docker logs my-container 2>&1 | vim -
docker ps -a | vim -
docker images | vim -
docker compose logs 2>&1 | vim -
Search git diff
git diff | vim -
Search env vars
printenv | sort | vim -
Search processes
ps aux | vim -