How do I show/hide the "CR" and "LF" text at the end of the text line?
-
On several occasions, I have had “CR” and/or “LF” white text highlighted in either green (commented text) or black (regular text) appear at the end of my text. I’m guessing I have accidentally pushed some hotkey to display this, but I do not know how to hide it. I’m guessing it stands for “Carriage Return” and maybe “Left Format” or something, but I just would like to know exactly what it is and how I can hide it? Thank you for your help!
-
View menu -> Show Symbol…then choose your desired setting of the top 3 choices.
-
LF stands for LineFeed, not LeftFormat
-
@Scott-Sumner I tried that - and checking or unchecking any of the top three choices didn’t seem to changea anything - there are still little white [highlighted with black] CR LF letters at the end of each line. Note that this is only true from where it was when I did whatever caused it to the end of the document - the part above there is unchanged. I discovered that I can delete them individually with the ‘Del’ key [and then re-enter the ‘New Line’ with the ‘Enter’ key, but there are literally HUNDREDS of them in the lower portion of my document.
-
can you make a screenshot and upload it?
Could it be that you mixed different EOLs?
EOL = end of line chars.
In the menu, there is this reversed P icon ¶
Is it pressed or not?Cheers
Claudia -
Thanks for the reply, Claudia. I located the reversed P icon and pressed it - and suddenly little black highlighted CRLF symbols appeared at the end of ALL lines! When I pressed it again, all the new ones vanished again, leaving just the ones that had been there before I pressed it the first time. I manually removed all the ones back to the current day in the list, since I won’t be uploading the rest. The file is a daily aid and saved list of headings for my Facebook page, where I’ve been uploading ‘Pictures of the Day’ for the last year and a half, and I add to it periodically and upload from it daily. I intend to save it as a record of my activities there.
-
I have no idea how to upload the screenshot I took before composing the previous message. I read the online help file, but to my old brain it was clear as mud. If you know how to do this, please let me know. [this is to anyone reading this message] - thanks!
-
Hello Jerry
,to upload a screenshot use a hoster like http://imgur.com/.
There is no need for registration, just paste your screenshot and upload it.
Once done you get the link where this picture has been stored, copy it
and paste it here.So, if you press the pilcrow (reversed P) you see two instances of CRLF at the end of each line?
If you see only one CRLF and another LF (in front I assume) it might be that there is a problem
with unix/windows eols mixed.
While windows is using CRLF as eol char, unix is using LF and mac is using CR.
(I don’t have a facebook account, so not quite sure how this is handled)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…In addition, can you post the debug->info (under ? menu)?
Cheers
Claudia -
If you have TextFX available then please try the following. On one typical place, select the unwanted characters at the end of line plus two more before the unwanted characters plus two characters at the start of the next line. Copy this selection and paste it into a new empty buffer. The buffer should now look similar to that below, where XX is the unwanted characters.
abXX
cdSelect the whole buffer and then use menu => TextFX => TextFX Convert => Convert text to hex-16. Copy the results of doing this conversion into a message on this thread.
If you do not have TextFX then it can be found via the Notepad++ Plugin manager.
-
Scott Summer got it right! I had the same problem fixed it by:
View menu -> Show Symbol
Works great! Thanks Scott.
Cheers -
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