I got an annoying problem which has been existing for my blogs at least since v2.9, can be reproduced by me on several hosting providers and for which I hope someone here has a fix:
normally I edit plugin and theme files via Dreamweaver. When I have to do a quick change, I sometimes also use the built in editor to edit plugin or theme files.
If I open these changed files afterwards via Dreamweaver (or simply by downloading them via ftp and opening them via editor or notepad), extra blank lines were added after each line:
This is very annoying as it bloats up my files, makes them developer-unfriendly to read and each time before I commit my changes to github for example, I have to replace those extra lines by running the following find/replace query via a regular expression:
replace with <strong>\n</strong>
I already searched official WordPress trac once and found a ticket (which I couldnt find again :-/) where a user reported a similar problem and developers said that this should be fixed - which is definitely NOT fixed.
Does anyone know how to solve this problem? I dont want to run the regular expression each time before commiting to github as it takes a lot of time to remove those extra lines on large files.
Thanks for any help!
Here is a patch
there are some discussions about this problem here:
ps: you can also use external editors like Ace/Codemirror when editing plugins/themes
Here is a plugin to use the Ace editor
I can't check if such a plugin solves the problem, since I don't get these extra lines ;-)
Hope this helps
Another solution would be to try to change the
Edit->Preferences->Code Format->Line Break Type
Here is a note from the [[LINK href="http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-7be0a.html#WSc78c5058ca073340dcda9110b1f693f21-7bdda"]]documentation[[/LINK]]:
<blockquote>Line Break Type Specifies the type of remote server (Windows, Macintosh, or UNIX) that hosts your remote site. Choosing the correct type of line break characters ensures that your HTML source code appears correctly when viewed on the remote server. This setting is also useful when you are working with an external text editor that recognizes only certain kinds of line breaks. For example, use CR LF (Windows) if Notepad is your external editor, and use CR (Macintosh) if SimpleText is your external editor.
Note: For servers that you connect to using FTP, this option applies only to binary transfer mode; the ASCII transfer mode in Dreamweaver ignores this option. If you download files using ASCII mode, Dreamweaver sets line breaks based on the operating system of your computer; if you upload files using ASCII mode, the line breaks are all set to CR LF.</blockquote>
Robert Harm comments:
thanks - that was the right approach. I tested some plugins and finally decided to use "Advanced Code Editor" which was the most current one.