qcz / vscode-text-power-tools

Text Power Tools extension for VS Code
https://marketplace.visualstudio.com/items?itemName=qcz.text-power-tools
MIT License
97 stars 14 forks source link

Implement sed one-liner "Join pairs of lines side-by-side" #67

Closed GreyArea765 closed 1 year ago

GreyArea765 commented 1 year ago

I'm sure there's an argument for implementing "Join N-numbers of lines side-by-side" but pairs is such a common requirement that I feel it would be useful to many.

It's a sed one-liner: sed '$!N;s/\n/ /' input.txt

Or done via the linux paste command: paste -s -d' \n' input.txt

qcz commented 1 year ago

Added Join every two/N lines family of commands in 1.41.0.