Say you have a buffer in Vim, and you want to run it through an external command. For the sake of example, let's say that command is sort. All you have to do is the following:
:% ! sort
or more generally
:% ! command
If you want to bring the output of a command into buffer you can do:
:r ! ls -l
or even:
:r ! cat filename | sort
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment