Dreamweaver blank lines removal

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Dreamweaver blank lines removal

    If Your Script Has Lots of unnecessary blank lines eg:
    PHP Code:
    $something 42;

    $else 100;

    if(
    $something<$else){

    echo 
    "Hello";

    }else{

    echo 
    "goodbye";


    and you want it to look like:

    PHP Code:
    $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"

    #2
    this was a headache for me..thanks a lot

    Comment


      #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

      Comment

      Working...
      X