Skip to main content
Participating Frequently
November 16, 2012
Question

Code Coloring in PHP and DW CS6

  • November 16, 2012
  • 1 reply
  • 2323 views

Hello,

I am having troube to get  a correct code hoghlighting like in cs4.

An Example:

if ( $a == $b ){

     echo 'yes';

}

else{

     echo 'no';

}

The echo function gets handled as script reserved keywords. So it gets the same color like the if's and else's.

That's not okay, because overview gets lost.

I also set the bracket color to black. They are shown in orange (like comments) - both bracket types....

Tabspaces:

I am suing tabspaces also for defining variables like:

$a          = "test";

$bb        = "anything else";

This also worked in CS4 but not in CS 6....(not a must, but makes the code looking nice and ist faster than spaces and more efficient)

I can place the equal signs only correct by using spaces. The settings in DW should be okay. Ich checked this.

Will this be fixed or can I fix it with an extension.

In my optinion the new DW is slower than the CS4. When I open a script it takes at least 2 seconds, before I see any code. 

The ftp Upload (with or without the speedup option) is also much slower _ I tested every option there.....

This topic has been closed for replies.

1 reply

David_Powers
Inspiring
November 16, 2012

3CEES wrote:

The echo function gets handled as script reserved keywords. So it gets the same color like the if's and else's.

While it's true that Dreamweaver CS4 treated the syntax colouring of "echo" as a function, it's not actually a PHP function. It's a PHP language construct (see http://docs.php.net/manual/en/function.echo.php), which might explain why it's now coloured differently in CS6.

I also set the bracket color to black. They are shown in orange (like comments) - both bracket types....

That appears to be a bug. You should report it to http://adobe.ly/DWBug.

Tabspaces:

I am suing tabspaces also for defining variables like:

$a          = "test";

$bb        = "anything else";

This also worked in CS4 but not in CS 6....(not a must, but makes the code looking nice and ist faster than spaces and more efficient)

I can place the equal signs only correct by using spaces. The settings in DW should be okay. Ich checked this.

I can't reproduce this problem on Windows (haven't tested it in a Mac). Pressing Tab works fine. However, it you select the option to insert tabs as spaces, you need to press Tab twice.

In my optinion the new DW is slower than the CS4. When I open a script it takes at least 2 seconds, before I see any code. 

The ftp Upload (with or without the speedup option) is also much slower _ I tested every option there.....

Are you using the Mac version? There are known problems with slow scripts and FTP on the Mac. See http://forums.adobe.com/thread/1100065.

David_Powers
Inspiring
November 16, 2012

You can fix the colour of the brackets manually by editing the Colors.xml file in your personal configuration folder.

Details of how to find your configuration folder are in http://forums.adobe.com/thread/494812.

The XML file is in the CodeColoring folder.

Locate the following line (it should be on or about line 143):

<syntaxColor id="CodeColor_PHPScriptBracket" text="#009" />

Change the value of the text attribute to "#000".

Save the page, and relaunch Dreamweaver.

David_Powers
Inspiring
November 16, 2012

I've done some further testing regarding the colour of brackets. They're displayed as orange immediately after changing the colour in Preferences.

If you close Dreamweaver and relaunch it, the new colour is displayed correctly.