Mutley Posted June 10, 2008 Share Posted June 10, 2008 As the title says, I keep getting PHP scripts opening with an extra line between each line of code, it makes the script twice the length. However if I open it in Notepad, it looks fine, how it should be. What's causing this and how do I fix it? Thanks, Nick. Quote Link to comment https://forums.phpfreaks.com/topic/109646-dreamweaver-adding-spaces-between-each-line/ Share on other sites More sharing options...
phpzone Posted June 10, 2008 Share Posted June 10, 2008 If you find out what's causing it, let me know, 'cos I want my code to be automatically shown double spaced Actually, I'm after an editor that's shows double line height but only has single lines. If people get what I mean. At the moment I purposely add an extra line between each statement, I'm using a PHP Optimizer on the server anyway, and I just find I can read code better with more space between each line. Quote Link to comment https://forums.phpfreaks.com/topic/109646-dreamweaver-adding-spaces-between-each-line/#findComment-562533 Share on other sites More sharing options...
Mutley Posted June 11, 2008 Author Share Posted June 11, 2008 Found how to repair the files but not fix it, it's to do with the format OS used (Windows/Linux/Apple). In your code: Find: (press Ctrl + m twice) Replace With: (press Ctrl + m once) And it will remove all the excessive lines! Quote Link to comment https://forums.phpfreaks.com/topic/109646-dreamweaver-adding-spaces-between-each-line/#findComment-563248 Share on other sites More sharing options...
makenoiz Posted November 19, 2008 Share Posted November 19, 2008 Im having this problem too and Im not happy about it. Its screwing up my php scripts. Does someone know how to turn that crap off in DW CS3? Quote Link to comment https://forums.phpfreaks.com/topic/109646-dreamweaver-adding-spaces-between-each-line/#findComment-693224 Share on other sites More sharing options...
Mutley Posted November 22, 2008 Author Share Posted November 22, 2008 I found another solution. If you download the files in 'Binary' mode with your FTP, it removes the extra lines. It seems when the file is edited in different applications and uploaded / downloaded. It adds these extra spaces. Binary mode fixed it for me. Quote Link to comment https://forums.phpfreaks.com/topic/109646-dreamweaver-adding-spaces-between-each-line/#findComment-696486 Share on other sites More sharing options...
aneesamini Posted July 6, 2010 Share Posted July 6, 2010 The solution is very simple: Edit > Preferences > Code Format > Line break type: LF (Unix) Quote Link to comment https://forums.phpfreaks.com/topic/109646-dreamweaver-adding-spaces-between-each-line/#findComment-1081652 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.