Link to home
Start Free TrialLog in
Avatar of Jerry L
Jerry LFlag for United States of America

asked on

How to Force Consistent Line Break Characters in Notepad++ versus Microsoft Notepad

SYSTEM
OS: Windows 7
Notepad:  v6.1 (Build 7601: Service Pack 1, 2009)
Notepad++:  v5.9.3 (Unicode)
Encoding: ANSI

PROBLEM
I am editing php files for a Wordpress related plugin. When I open a file in Notepad, there are NO line breaks, unless I select "Format > Word Wrap".

The same file in Notepad++, on the other hand, shows double spacing instead of single spacing. When I turn on "View > Show Symbol > Show All Characters," you can see an extra CR character (at the end of a line) followed by CRLF (in the blank line space between lines).

Also, it seems as though something changed between today and yesterday. Yesterday, these double spaced lines were showing up as single spaced. I did not make any configuration or preference changes in Notepad++. Encoding is set to ANSI.

It also looks like this may be dependent on where the files originated from. The WP eMember plugin files seem to be having the double space problem, TODAY. But they did not have the problem, YESTERDAY (exact same files from my hard drive on both days) !  The Genesis theme files are ok - consistent single spacing on both days.

QUESTION
(a) What can I do to make these Line Breaks consistent when viewed by either Notepad++ or Microsoft Notepad? If I make changes in one editor, I want it to look the same when I edit in the other editor. (b) And why the difference in line spacing from one day to the next?

UPDATE
Regarding the second part (b) of the question: It seems when I unzip the wp-eMember plugin on my hard drive, the files contain the correct line break characters. But when I download to my Windows system the same files from the Linux hosting server, where they were unzipped and installed when I used the Wordpress Add Plugin utility, that is when the line breaks get messed up.

The first part of the question (a) remains open, however. How to make the line breaks consistent from one editor to the other. Is it possible? And why the sudden change in my editor?

User generated image
SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jerry L

ASKER

Thank you both for your input. I took a look at conTEXT editor; perhaps you could elaborate what features you prefer over those of Notepad++ which has one of my favorite tools, "Search > Find In Files." That search works for me as a replacement of Microsoft's search when searching for file contents. I didn't realize Notepad had lost its plain text feature.

I neglected to transfer the files in binary mode from the server when using FileZilla FTP. When I unzipped the files directly on the hard drive, however, all the line breaks were correctly rendered.
I use Windows Grep http://www.wingrep.com/ for searching in files.  You can specify an external editor for use on the right-click menu.
It is not a question of prefer by referencing Contetext, the issue is that notepad++ and notepad are extremely different and it is rather simpler to compare formatting notepad++ and context of the same file.
since the impression I got from your initial dealt with how to maintain appearance of the code in two significantly different apps.
Avatar of Jerry L

ASKER

Thanks for your clarification, Arnold. And the WinGrep suggestions sounds good. Not sure why I never heard of it before.
I have a list of editors and other tools that I use here:  http://www.dibsplace.com/webdev/ndx02.html#dsoft
Avatar of Jerry L

ASKER

Nice list. I don't see Scooter Software's Beyond Compare. I've been using it for years now and am quite happy with it. You can see a chart of comparison data here: https://en.wikipedia.org/wiki/Comparison_of_file_comparison_tools - Includes WinDiff, WinMerge, BeyondCompare, Diff, and several others.