3 ms·
> you can then use "%!ls" to replace the contents of the buffer with directory listing and edit the commands you want. I often used :r !ls for that, thanks for
by RMPR 6y ago
> you can then use "%!ls" to replace the contents of the buffer with directory listing and edit the commands you want.
I often used :r !ls for that, thanks for the tip + it's shorter
- gpanders 6y agoNote that in general this is not a one-to-one replacement. `%!cmd` sends the current buffer contents to `cmd`’s stdin and replaces the buffer with `cmd`’s output. In the case of ‘ls’ this works since it doesn’t take anything on stdin