Score:0

Unable to see and edit the character that is typed when you press the Enter key in simple text editors like KWrite

in flag

I'm a newbie to the KDE Plasma interface. I find myself unable to see and edit the character that is typed when you press the Enter key in simple text editors like KWrite.

waltinator avatar
it flag
What do you mean by "line shift"? Do you mean LF (`^J`, `012`, `0x0A`)? Linux/Unix uses LF as an End-of-Line indicator. I'm unfamiliar with KWrite, but does it offer a command to "join" lines? That would have the effect of deleting s LF.
in flag
I'm not sure of its official name, but if you hit the enter bottom while writing text you get a line-shift. To remove this I used to search and replace them in a simple writer program, but now on KDE, I cant see these line-shifts, and therefor not search and replace them. it doesn't have to be KWriter, just any Ubuntu text editor...... Thanks in advance
in flag
I think you're asking "is there a text editor for KDE that shows line-feeds/carriage returns (LF/CR)"? Kate (which you probably have installed) can show some whitespace characters, or Notepad++, VS Code, jEdit, ...
mchid avatar
bo flag
Have you tried searching and replacing the new line character `\n`? I believe this works on gedit using the find and replace feature but it does not show a character for a new line (you cannot see the new line characters, `\n` on the text editor but you can enter `\n` into the find field for find and replace and it will find the new lines and replace them with whatever).
mchid avatar
bo flag
We can reopen this if you help to clarify.
Score:0
sa flag

The linefeed in Gedit text editor and many other text editors such as Emacs and KWrite is denoted by the \n regular expression. The below screenshot shows the how to use \n in Gedit text editor. The Find and Replace feature in Gedit is accessed by ≡ (Gedit options) → Find and Replace. Check the regular expression checkbox so that \n will be recognized as a regular expression instead of as two separate characters.

enter image description here
Regular expression mode in Gedit Find and Replace

enter image description here
Regular expression mode in KWrite text editor

In LibreOffice Writer a new paragraph character is typed in the document every time the user presses Enter instead of a linefeed. In order to recognize the new paragraph character in LibreOffice Writer the Alternative Find & Replace for Writer LibreOffice extension must be installed. A new paragraph character is denoted by the \p regular expression in Alternative Find & Replace.

Score:0
in flag

Mousepad, a simple text editor for the Xfce Desktop Environment, is maybe the simplest way to reduce/increase the amounts of paragraph characters, as copy & paste is possible if "Display line endings" is selected!

enter image description here

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.