Timeline for Replacing Multiple blank lines with a single blank line in vim / sed
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 16, 2021 at 6:08 | comment | added | silicontrip | I use a technique like this using the fmt command to do hard word wrapping on text and unexpand to convert spaces to tabs. | |
| May 28, 2017 at 22:32 | comment | added | Niko Bellic | I think you can also use \r instead of ^M like this: %s!\n\n\n\+!\r\r!g | |
| May 7, 2011 at 20:43 | vote | accept | Andrew Bolster | ||
| May 7, 2011 at 20:43 | comment | added | Andrew Bolster | Marking as 'winning' for the :%!cat -s. Learn something GNnew everyday! | |
| May 7, 2011 at 20:40 | comment | added | maxschlepzig | wow, did not know the -s option of cat - just a historic note, it is not in POSIX, but seems to be available in BSD and GNU cat. | |
| May 7, 2011 at 20:34 | history | edited | Caleb | CC BY-SA 3.0 | added 1 characters in body |
| May 7, 2011 at 20:24 | history | answered | Caleb | CC BY-SA 3.0 |