PDA

View Full Version : Why do Notepad files get all jumbeld up without line breaks?



Harold Mansfield
11-25-2014, 06:53 PM
Most times that I open a text file in notepad it keeps it's original structure. But every now and then something happens and every file I open is just one big mess of text. No line breaks.
I'm positive that this is a setting on my computer but I've never been able to figure out why it does that.

Anyone know what I'm talking about and what the fix is?

Freelancier
11-25-2014, 08:32 PM
Notepad++ (http://notepad-plus-plus.org/) is what you want to use instead.

The issue is that Notepad wants a CR + LF to end a line (which is a Windows standard), but files that come from Linux or Mac might only have the LF, so Notepad doesn't know that that's a valid line break.

Harold Mansfield
11-25-2014, 08:51 PM
Notepad++ (http://notepad-plus-plus.org/) is what you want to use instead.

The issue is that Notepad wants a CR + LF to end a line (which is a Windows standard), but files that come from Linux or Mac might only have the LF, so Notepad doesn't know that that's a valid line break.

But I don't understand why it works sometimes, and then others every notepad file that I open is all jumbled up.
It's not just some files. It either formats properly all of the time for any file, or not at all for any file.

That has to be a setting and because it's all or nothing no matter, even with just files that I created on my computer.

Freelancier
11-25-2014, 09:45 PM
Ah... I think it's the Format menu, uncheck the Word Wrap menu pick.

billbenson
11-25-2014, 11:23 PM
I agree with the notepad ++ recommendation. There are also a bunch of other open source text editors for free that are better than notepad. Some will highlight php beginning and end brackets and other stuff that is useful.

You didn't say what you are using it for, but I have a text editor (it may only be a Linux editor) that I use the heck out of. Both for code editing and notes. I don't use a pen much anymore. When someone calls me which is generally all day long, I answer the phone and open it up. It has everything from what I need to buy people for Xmas to some passwords to customer questions I need to follow up on. Every time I need to find something its a Cnt F. I hit next a few times and I have it. I load every entry with keywords so I can find it.

My first entry was Jun 18 2008 and it's 36k lines long. Probably better start a new one. I don't know if there is a file size limit. Its been a very useful tool over the years for both programming and what I just described. It also has my todo list.

Harold Mansfield
11-26-2014, 09:56 AM
Thanks, I'll give that a shot.

FYI, I do have Notepad++ and use it all the time. But believe it or not, sometimes I just like the old school, plain white space of notepad. Especially when I'm doing simple file edits that I've done a million times and know where the line is.

Harold Mansfield
12-01-2014, 11:59 AM
Ah... I think it's the Format menu, uncheck the Word Wrap menu pick.
Yep, that was it. Amazing that I never knew that after all these years.
Thanks