How Can I Remove Spacing in TextPad?

The most basic way to get rid of extraneous spaces from text documents is to scan for them line by line and remove each one with your Delete key, but this can become quite tedious work. If you are using a text editor like TextPad, however, you can remove unneeded spacing instantly using the application's built-in Replace tool. The Replace tool can also remove all blank or empty lines from your document.

Three executives using laptop during meeting in boardroom, smiling
Spaces, tabs and blank lines can improve the readability of text documents you share with others.
credit: Thomas Northcut/Digital Vision/Getty Images

Remove Space Character

Step

Click the "Search" menu and choose "Replace." Alternatively, you can click the "Replace" button on the tool bar.

Step

Click within the input box labeled "Find what" and then press your space bar once. Leave the "Replace with" input box empty.

Step

Select the "Active document" radio button so that TextPad removes the space characters in the current document only.

Step

Click "Replace All" to command TextPad to search for each space character in your document and remove it without putting anything else in its place. Each line of your document should be condensed and free of empty spaces.

Remove Tabs

Step

Type "\t" in the "Find what" input box. TextPad and Windows interpret "\t" internally as the code signaling a tab indention, rather than the literal character string “\t.”

Step

Select the "Text" and "Active document" radio buttons.

Step

Check the box labeled "Regular expressions." When "Regular expressions" is selected, TextPad will scour through your document for the internal codes rather than literal characters. When it finds the internal code for "\t", it will delete the preset number of spaces that each tab represents.

Step

Click "Replace All" to remove all tabs from your text document.

Remove Empty Lines

Step

Type "\n" in the "Find what" input box. The "\n" characters internally signals the end of the current text line and the beginning of the next line in your document. The "\n" character sequence is also known as the "newline" or "end-of-line" code.

Step

Check the box labeled "Regular expressions." TextPad will scan your entire document for the newline code.

Step

Click "Replace All" to remove all blank lines from your document. All the text in your document will then be displayed as a single line.