The reasoning behind removing trailing spaces while editing is that when working on a document, we want to keep our own changes clean of trailing spaces. This way, we can for instance provide patches that are not cluttered with whitespace changes, and we just change lines that we really want to change. For instance, you do not want to remove trailing spaces if the cursor is currently in the trailing spaces area. This alone means we have to kind of remember that we touched this line, and then remove it later. This was always hacky, and in fact, there are still corner cases that did not work.
Whitespace: The Silent Killer
There are many different ways you can remove blank lines from text, text file, or a document and it all depends on what type of computer and software program you're using. Below are all of the different ways to remove blank lines. Using our free online Text Tool , you can remove any blank line from any submitted text. In addition to removing blank lines, you can also replace blank lines with other text and perform other text manipulations from any computer or device.
I find these very handy when porting code from one language to another, or when building a document by cutting and pasting from multiple sources, etc. I would really like to see this tools in SublimeText 3 — ie: as built-in tools, not as a third party package. I think they are useful in so many contexts that they deserve to be part of the built-in functionality.
The ease of copying and pasting text from Web sites and email greatly simplifies many tasks in Word, but problems often arise in making the pasted text conform to the style of the document into which it is pasted. One of the most common chores is getting rid of excess line breaks, which cause the text to wrap short of the right margin. There are several ways to work around this problem. The most efficient method of reformatting short lines of text depends on whether the breaks are line breaks or paragraph breaks. So the first line of attack must be to display nonprinting characters:.