Trim the whitespace in vi | arfore dot com

Today when I needed to copy some text on my CentOS server, I ended up grabbing a bunch of whitespace at the end of each line.  Normally this wouldn’t be a problem, since I would have copied from a regular browser.  In this case I was copying from with eLinks since I don’t have a graphical browser installed yet.

Sure, I could have just navigated to the end of each line and then used shift + C to delete, but I this was a 25 line block of text and that would have been too tedious.

Here’s the quick search and replace syntax to handle this for you: