Lines broken
-
When I “clean” a text using Notepad++, the lines of the text appear interrupted, or “broken”. That is, the sentences appear in different lines. I suppose it is due to the many parts I have to erase to clean the text. Is there any way to make the lines appear complete? I’m not an expert… Thanks in advance.
-
I think I understand what you mean. If so, this is more a matter of getting a clear sense of how text files work than needing to know any particular tricks about Notepad++.
As a “plain text” editor, Notepad++ just shows you what is actually in the file.¹
For “normal” characters, “abcdefg” and so on, you just see the character. Line endings — what you get when you press the “Enter” key while editing — are also characters, but they are displayed by starting a new line.
You can add a line ending any time, between any two characters, by pressing Enter. And you can delete a line ending by putting the typing cursor at the beginning of a line and pressing Backspace, or by putting the typing cursor at the end of a line and pressing Delete.
What’s probably happening to you is that you’re deleting text without deleting the preceding or following line endings. Typically you’ll want to type a space after deleting the line ending, so the end of what was one line and the beginning of the next don’t run together.
If you are copying the text from some other source, like a web page or a pdf, an additional complication is that those formats, and others, are not “plain text” and do not always show spaces, line endings and sometimes other characters directly: they display them according rules defined by the format. So you might be seeing them “raw” in Notepad++ (which might even be why you need to “clean” them in the first place).
In some cases, where you have a sequence of separate lines that should be a single “paragraph” of text, Edit | Line Operations | Join Lines can help; highlight the lines you want to join and select that command from the menu (or type Ctrl+J) and Notepad++ will replace each line break in the highlighted lines with a single space.
You might already know about this setting, but just in case: on the View menu there is a setting named Word wrap. When that setting is checked, Notepad++ shows lines that are too wide to fit in the window by breaking them at a space character and wrapping them to the next display line. When it is not checked, long lines remain as single lines and you have to scroll to the right to see the parts beyond the edge of the window.
For a plain text file, you usually want Word wrap checked, because most people type each paragraph without any “hard” line breaks: that way it will fit whatever width window is used to read it. If you need to manage exactly where each line ends (like you would on a typewriter), then you might want it unchecked — but usually, checked is better.
¹ There are a couple exceptions, such as syntax highlighting for programming languages, which I’m pretty sure don’t apply to what you’re doing. I describe “Word wrap” a little further down in my message.