(no title)
thor_molecules | 1 year ago
For example, if I define an alias thing, vim won't know about it.
But as a executable on my $PATH, I can do any of the following:
:%!thing
:'<'>!thing
:.!thing
A good example is on my work machine, I can't install jq because reasons. However I do have python, so I have a simple executable called fmtjson that looks like this: #!/bin/sh
python -m json.tool --indent 2
When I want to format some json from vim, I just run: :%!fmtjson
Easy to remember, easy to type. Plus I can use it in pipes on the cli.
No comments yet.