How do I show/hide the "CR" and "LF" text at the end of the text line?
-
when I editing the document Suddenly CR LF was appeared on all subsequent lines (not appeared above of the line I edited).I have tried checking and unchecked view > show symbol > all settings as suggested.NO luck.also when I change the settings to “show all characters” additionally F character appearing at the end of lines and when I disable the “show all characters” only F is disappeared.
I have done 4hrs of work analysing the logs and have highlighted many important process id’s through style token.so I can’t
close notepad++ and reopen.Please suggest some options and help me…
-
Posting a screenshot may help…
-
I was about to post a screenshot of this problem when I found the solution in Claudia Frank’s answer above:
Or could it be that the document itself is quite large?
I’m thinking about npps’ backup functionality, maybe it’s stepping in while you are
currently editing and it’s corrupting the document.
Uncheck Settings->Preferences->Backup->Enable session snap…This is a dangerous problem in session snap, it sometimes corrupts the file with no warning except that the screen display starts showing unwanted CR LF icons below the edit point. In one form it looks just like I had hit the pilcrow (reverse P) tool button or otherwise chose to show all characters, except that those white letter/black backrground CR & LF icons show up on all lines of the display in normal operation with the pilcrow. They only show up on the bottom half of the screen with this bug, below the edit point. It often happened when I was deleting a few lines in a 40 megabyte file. Often they would immediately disappear if I hit Ctl-Z. Sometimes it happened while I was scrolling down quickly with the down arrow key. Then the anomalous CRLFs often disappeared if I hit up arrow once.
There are other forms I’ve seen; sometimes the CR LF icons appear in the middle (vertically) of the screen – the lines display their last half, then icon CR LF, then the first half of the next line. There is a ragged column of CR LF icons down the center of the screen, with text on both sides. The screen display does not do a CR LF until the middle of the next line. Sometimes there is an icon I have not seen before following the CR LF icons – it is a white E on a black background, Hitting pilcrow causes the CR LFs on the top half of the screen to appear and disappear as expected, but it does not change or add to the CR LFs below the edit point. Scrolling the screen so the edit point rolls off the bottom does not help; they are still there when the screen scrolls up again, and they affect the display of the whole rest of the file. Sometimes ~100 bytes of text from later in the file are inserted at the edit point. So far when I check the inserted text it still exists where it should be, as well as being copied to the edit point. But check the last line of your fiie! My last line often loses a few characters (<20), not every time. I am hoping that is the only line besides the edit point to be corrupted.
The only way I have found to get the CR LFs to go away is to save the file, close, reopen, then all is back to normal (I hope) except the sometimes corrupt last line and the text inserted at the edit point.
After turning off session snap, I was able to edit for hours without problem recurring; it had been happening roughly every 20 minutes. I never saw the problem during years of using notepad++ 5.9 . It started when I updated to 7.3 (32 bit) and persists in 7.31 .
-
I was editing a file and saw this same type of situation. From the edit point to the end of the file now shows the CR LF symbols in reverse (black rounded corner boxes with white lettering). View -> Show -> End of Line characters is not checked. Also the first character of every line till the end of file is missing the first character.
I thought I may have pressed a key combo at the time this occurred but I don’t know what it was as I was not meaning to do so. Something with ctrl, laptop [fn], windows key, or alt and another key in the “[tab]qwe, [caps lock]asd, [shift]zxc” diagonal of the keyboard corner.
Screen shot here: http://imgur.com/xbZ5ZMP
-
Forgot to mention that the error / glitch occurred in Notepad++ version 7.4.2 (32-bit) Build time: Jun 18, 2017 23:34:19
Undo (ctrl+Z) did not correct the CR LF display either but did undo the last edits that had been made to the file.
But, I did save the file, close it, and reopen it and the visible CR LF characters were not longer shown and the first letter of every line were there (not missing after all)
I also noticed that by pressing the Show all Characters in the Toolbar when the glitch was present some additional chars were added at the end of lines and could be toggled on and off but the CR LF never went away. These additional chars were [HT ] showed up and a 1/2 character B in reverse color (did not take a screen shot before clearing up the problem to show that. BAD of me not to do so.
-
You may have figured this out, I was plagued with the CR/LF in my shl’s until I figured out in Preferences to change from the default Encoding UTF-8 to ANSI. I already had the Format to UNIX (LF). Then I copied (CTRL A/CTRL C) on my existing code with the CR/LF and pasted into a new document and there I finally got only the UNIX LF I was looking for. Having the CR/LF prevents the SHL from running in unix. You can ‘turn on or off’ the line endings in View>Show Symbols, so that you can tell if you are getting the CRLF or just the LF. I’m keeping mine on, that way I don’t have my sysadmins telling me that I have line endings again! So embarrassing.
-
Try to avoid spreading misinformation. UTF-8/ANSI/whatever encoding has nothing to do with line-endings. The status bar will show, for the current editing tab, the line-ending type. Double-clicking that section of the status bar will allow you to change that line-ending type for the file (no need to copy and paste into another tab of the correct type). You don’t have to keep visual line-endings on, just glance at the status bar. If you are working on shell scripts that run on *nix, you want the status bar section to say “Unix (LF)”; if you are working on files that will be used on Windows you want it to say “Windows (CRLF)”. Simple.
-
I just saw this problem again in v7.5.8. I have session snapshot enabled. The sudden CR LF’s appeared only in the bottom half of the document (from the point where I was editing and below). With View/Show Symbol/Show End of Line, I saw CR-LF-E at the end of each damaged line.
I fixed the problem by copying all of the apparently damaged file to a new document, without closing the editor. Things looked good enough at that point that I continued editing, so I can’t be sure whether there was some minor damage at the point where I was editing.
-
I’m a returning user to Notepad++. It’s an excellent simple text/ ASCII text editor.
The CR and LF are part of the original ASCII code set and are a couple of the ‘machine codes’ (codes 00 to 31) that go back to the teletype origins where it was literally a command to reposition the print carriage back to the left margin and roll the platen up the space of a single line. The 2 command CR& LF were sent by TTY operators to start new lines… Later some printers and word processing apps were designed to automatically execute a line feed with every CR which led to the need to edit/convert some text documents for compatibility with different printers/word processors.
I like to see the CRLF to make sure they are there in the document and the line breaks are ‘hard’ and not interpreted by the app based on TAB, commas (CSV), semicolons, etc.
In a computer printer or display the commands tell the device to show the next character down a line space at.the left margin (or indentation).
-
@Tom-Klecker said in How do I show/hide the "CR" and "LF" text at the end of the text line?:
I’m a returning user to Notepad++. It’s an excellent simple text/ ASCII text editor.
The CR and LF are part of the original ASCII code set and are a couple of the ‘machine codes’ (codes 00 to 31) that go back to the teletype origins where it was literally a command to reposition the print carriage back to the left margin and roll the platen up the space of a single line. The 2 command CR& LF were sent by TTY operators to start new lines… Later some printers and word processing apps were designed to automatically execute a line feed with every CR which led to the need to edit/convert some text documents for compatibility with different printers/word processors.
I like to see the CRLF to make sure they are there in the document and the line breaks are ‘hard’ and not interpreted by the app based on TAB, commas (CSV), semicolons, etc.
In a computer printer or display the commands tell the device to show the next character down a line space at.the left margin (or indentation).Activate it via menu view->show symbol->show end of line