Dreamweaver blank lines removal

Started on the old forum in July 2010 · view the original in the archive · old links redirect here

#blank #dreamever #removal #space

2 replies · 1,786 views · started 16 years ago · 1 min read

something else Fellow · 2,296 posts #1

If Your Script Has Lots of unnecessary blank lines eg:

$something = 42;

$else = 100;

if($something<$else){

echo "Hello";

}else{

echo "goodbye";

}

and you want it to look like:

$something = 42;
$else = 100;
if($something<$else){
echo "Hello";
}else{
echo "goodbye";
}

simply:

1: Open the file 2: Click CTRL + F 3: Select "Current document" in "Find in" (You can also select the folder if you have multiple files) 4: Search in "Source code" 5: Tick "Use regular expression" 6: Type "[\r\n]{2,}" (without quotes) in "Find" 7: Type "\n" (without quotes) in "Replace" 8: Press "Replace All"

Guest #2

this was a headache for me..thanks a lot

something else Fellow · 2,296 posts #3

To Stop dreamweaver applying double Line breaks

goto Edit> Prefferences> Code Format> Line Break Type> LF (unix)

you may need to restart Dreamweaver for this to apply 🙂

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close