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.
Written by Jesse Dearing
Related protips
2 Responses

Very nice!
over 1 year ago
·

+1
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#