Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable PHP highlights in VS 2010?

I've heard that Visual Studio 2010 Beta 2 has support for PHP. When I load a PHP file though, it has nothing highlighted and is nothing more than a glorified text editor.

Is there a way to enable it?

like image 584
bugfixr Avatar asked Apr 20 '26 19:04

bugfixr


1 Answers

You can enable syntax highlighting for php files using a simple hack in Visual Studio 2010 (might also work for earlier versions)

Open Tools -> Options dialog from the menu, and select Text Editor -> File Associations on the left. Add php as a new extension and select 'Microsoft Visual C++' in the adjacent combo box. Apply and now you and open and edit any php file in Visual Studio with Syntax highlighting and code folding. The only problem come is when the file has mixed php and html code. It does not look really good and editing is painful.

I have tried VS.php, and I am certainly not impressed. The only thing it can add to visual studio is creating a php project easily, otherwise, I haven't been able to find it any more useful.

like image 182
Samnan Avatar answered Apr 23 '26 07:04

Samnan