The simplest way to get rid of extra spaces in text documents is to look for them line by line and use the Delete key to get rid of each one. This can be a lot of work, though. But if you are using a text editor like TextPad, you can use the Replace tool to get rid of unnecessary spaces right away. You can also get rid of all blank or empty lines in your document by using the Replace tool.
Remove the space character
- Step 1: Select “Replace” from the “Search” menu. You could also use the “Replace” button on the tool bar.
- Step 2: Click inside the box that says “Find what,” then hit the space bar once. Don’t type anything in the “Replace with” box.
- Step 3: Choose the “Active document” radio button so TextPad only gets rid of the spaces in the current document.
- Step 4: Click “Replace All” to tell TextPad to look for every space in your document and get rid of it without replacing it with anything else. Each line in your word document should be as short as possible and have no empty spaces between words.
Remove the Tabs
- Step 1: In the “Find what” box, enter “t.” TextPad and Windows see “t” as the code for a tab indentation, not as the literal string of characters “t.”
- Step 2: Choose “Text” and “Active document” from the drop-down menus.
- Step 3: Check the “Regular expressions” box. When “Regular expressions” is chosen, TextPad will look through your document for internal codes instead of literal characters. When it finds the internal code for “t,” it will delete the number of spaces that each tab represents.
- Step 4: Click “Replace All” to get rid of all the tabs in your text file.
Remove the blank lines
- Step 1: In the “Find what” box, enter “n.” The “n” character tells your document that the current line of text is over and that the next line has begun. The sequence of characters “n” is also called the “newline” code or the “end-of-line” code.
- Step 2: Check the “Regular expressions” box. TextPad will look through your whole document to find the code for a new line.
- Step 3: If you click “Replace All,” all of the blank lines in your document will be removed. Then, all of the text in your document will be shown on one line.