How to easily escape a command-line filter
问题 I've seen discussions about performing pipes in Vim of the type :%! cmd1 | cmd2 | ... And it works with :w as well :.w !cat | cat And it works with :r :r !echo hello | cat :r !ls | grep .mp4 But the second I try something more ambitious, like, say, awk , it stops working: :r !ls | awk '{printf "\"%s\"\n", $0}' E499: Empty file name for '%' or '#', only works with ":p:h" I have tried dozens of variations on the syntax to get it to work, including surrounding the entire command-line after !