Hacker News new | ask | show | jobs
by phamilton 5228 days ago
in Vim:

{range}!command will pipe content from vim to another command and back. Examples:

Sort contents of lines in place

:'<,'>!sort

Replace lines with calculated results (ie, line contains "2+3*5" and gets replaced with "17")

:'<,'>!bc

1 comments

I see. Thank you for clarifying, I wasn't aware that was possible. I won't say that's unnecessary but I have yet to need such functionality.