3 ms·
“: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 ‘.
by 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.