TIL: pipe output from terminal command into Vim

2021-01-08 00:00:00 +0000 UTC

To execute a shell command from Vim and send the input to your current buffer, you can use the read command. To create the directory tree in my post about Ansible roles, I used this Vim command:

:read !tree --charset=ascii

from the root directory of my roles project.

Tags: til vim