3 ms·
How can vim write to stdout? I use the stdin frequently as a better `less` but haven't use stdout.
by kevincox 5y ago
How can vim write to stdout? I use the stdin frequently as a better `less` but haven't use stdout.
- evanreichard 5y ago“:w !command” (e.g. “:w !wc -l”) Another fun one is “:%! command”, which pipes the current content to command, and replaces it with the output. (E.g. “:%!jq ‘.’” - to pretty print json). Pretty useful to quickly iterate when building a complicated command with multiple pipes.