views:

4387

answers:

8

I recently installed PHP 5 on IIS, however, I am unable to find a PHP syntax highlighting plug-in or extension for VWD. Where can I find a plug-in? I thought there was an official one.

+4  A: 

Consider PHP IDE for Visual Studio.

http://www.jcxsoftware.com/vs.php

I have used this and it adds a lot of nice PHP specific features to Visual Studio.

From their site...

Editor and File Management

•PHP4 and PHP5 Support

•Syntax Coloring for PHP, Smarty, HTML, JavaScript, CSS, XML and XSLT

•File templates for PHP, Smarty, HTML, JavaScript, CSS, XML and XSLT

•Intellisense for PHP, Smarty, HTML, JavaScript, CSS, XML and XSLT

Debugging

•XDebug and DBG support

•Debug PHP, JavaScript and .Net in one single session

•Built-in Apache web server for ease of debugging. Preconfigured with Php4, Php5, XDebug and DBG.

Jeffrey Hines
I was hoping free! but good input.
teh_noob
A: 

There is no official plugin for PHP for Visual Web Developer. I believe that this is because Microsoft would rather you use their .NET products, (notably ASP) which serves most of if not all of (I can't exactly say as I don't really use ASP as much as PHP) of the functionality of PHP.

There are however, some very good PHP IDEs out there. A list of which you Here

Noctrine
A: 

if you're using windows there's an application called notepad++ that will do syntax highlighting for dozens of languages. I used it for C but I know it has a php syntax highlighter and many more languages coming along. Check it out on sourceforge. If your using Linux or Unix you can use K Advanced Text Editor (kate). It also has a console window built in.

mikeyickey
+2  A: 

I've tried a lot of text editors, some free, some commercial. So far Visual Studio is the only one that has the right combination of features to be most useful to me. So, coding PHP in VS is important to me.

You can trick Visual Studio (and hopefully also Visual Web Developer) into thinking .php files are C++ with a registry hack. The syntax highlighting is close enough to be useful.

This blog post explains how to do it for all versions of VS: http://blog.cumps.be/visual-studio-2008-and-php-coloring/

spoulson
Thank you for a good answer, those first two sentences sum up what I think exactly! I was just hoping that because Microsoft was making kind of a deal about PHP integration lately, that they would have had syntax highlighting for it. Guess not. Hopefully in VS 2010 they will.
teh_noob
You're welcome. Don't count on direct PHP support from Microsoft. :)
spoulson
Lol, I most definitely wont!
teh_noob
A: 

What I am looking is for a debugger for PHP that is as useful as the one built into Visual Studios. I searched high and low for this and there seems to be none that works well.

+1  A: 

I don't know about older versions, but VWD 2010 allows you to link any extension to any type of formatting in its options.

Tools->Options

click 'show all options'

Expand 'Text editor'

click on 'file extensions'

type in 'php' and select how you want it to be formatted (I recommend the Automatic Editor Selector), click Add

And there you go! Next time you load the page you will see the changes. If you don't like it, there's 20 other styles to choose from.

+1  A: 

thx, I use the last post with "HTML format" instead "automatic editor selector"

bruno