Skip to main content
Participating Frequently
November 16, 2012
Question

Code Coloring in PHP and DW CS6

  • November 16, 2012
  • 1 reply
  • 2322 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.

3CEESAuthor
Participating Frequently
November 16, 2012

I changed the bracket color again and restarted DW now it works.

The Tab Problem:

I am using Win7 Profesional 64bit Version. You can reproduce the tab problem easy:

Type on a new line a tab and the equal sign like this:

$a     = '';

$ab   =;

The Equal sign should be in the same col like that one above, but it isn't. It is one space(that from the b) intended.

The Script Problem:

With script I meant a file, like a php or css file.....I just opened a php file with 1500 line of code. It took about 3 seconds. In DW4 it opens immidiately.

the slow ftp problem seems to be fixed, too. i had installed a dreamweaver add on, which caused this slowness.

Some files still open very slow. Please have a look at this one.

It took about 10 seconds to open it and DW freezed. (I have about 5gig Ram and an Intel Dual Core 2x2.13 GHZ). In DW 4 it worked.

David_Powers
Inspiring
November 17, 2012

David_Powers wrote:

3CEES wrote:

The Tab Problem:

I am using Win7 Profesional 64bit Version. You can reproduce the tab problem easy:

Type on a new line a tab and the equal sign like this:

$a     = '';

$ab   =;

The Equal sign should be in the same col like that one above, but it isn't.

I'm also using Windows 7 Pro 64-bit. The equals sign is correctly aligned when I press Tab.

Hmm which settings do you use?


Same as you.