How Can I Remove Spacing in TextPad?

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
Spaces, tabs and blank lines can improve the readability of text documents you share with others.
Image Credit: Thomas Northcut/Digital Vision/Getty Images

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.

Advertisement

Remove Space Character

Video of the Day

Step 1

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

Video of the Day

Step 2

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

Advertisement

Step 3

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

Step 4

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.

Advertisement

Remove Tabs

Step 1

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."

Advertisement

Step 2

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

Step 3

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.

Advertisement

Advertisement

Step 4

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

Remove Empty Lines

Step 1

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.

Advertisement

Step 2

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

Step 3

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.

Advertisement

Advertisement

references