Last Updated: February 25, 2016
·
1.325K
· jessedearing

Non-destructive Vim piping

You can pipe content through a command in vim without replacing the buffer with the results of that command by using <range>:w !<command>

For example,

:w !cat -

Will cat the whole file.

:.w !cat -

Will cat the current line.

2 Responses
Add your response

Very nice!

over 1 year ago ·

+1

over 1 year ago ·