Add html support to PHP Eclipse - php

I downloaded eclipse for PHP and while code hinting works for most of PHP, their is none for just HTML. How can I fix that?

Eclipse for PHP is no longer supported (clickity click), so even if you find a way to do this it will not be supported anymore.
The Aptana plugin for Eclipse has great PHP and HTML assistance and I recommend it highly:
http://www.aptana.com/

Related

How to turn on PHP auto-complete in Adobe-Brackets

I have installed Adobe-Brackets 0.41. And I installed following extensions :
Integrated Development
PHP Syntax Hint
QuickDocsPHP
But when I writing PHP code (for instance mysql_) and pressing Ctrl+Space it won't complete the PHP codes!
Does brackets support PHP auto-complete at all?
Any ideas?
P.S:
Auto-Complete works fine with HTML and CSS codes.
There is a hint extension for brackets now!
https://github.com/mackenza/Brackets-PHP-SmartHints
Btw I hope you like my QuickDocsPHP extension ;)

PHP Tools extension and HTML intellisense

I got the PHP Tools professional version, but realized that it only has php intellisense, and that it only has color highlighting for HTML. While html itself admittedly isn't difficult, I would like to have intellisense for it as well.
Does anyone know of a way that I can link both PHP and HTML intellisense to a single extension?
I tried to go to options->Text Editor->File Extension and set the php extension to the HTML editor, but it removed the PHP Tools intellisense and just replaced it with the HTML one. What I'd really like is to keep the php while adding (not replacing) html editor tools.
This is known limitation of external editors for Visual Studio. Anyway according to PHP Tools features page (just updated), the work is in progress. For now, it isn't possible to 'mix' two languages like HTML & PHP.
Look at this thread:
http://support.devsense.com/viewtopic.php?f=21&t=987
Seems to come soon :-).

PHP intellisense on Visual Studio - Is it possible?

Nothing compares to Visual Studio. Infact it is the reason why I develop using Asp.Net. But once in a while I encounter a client who specifically wants a solution authored in PHP.
All PHP IDEs(Free) I have used lack a vital feature available in Visual Studio that I love so much - INTELLISENSE. So is there a free way to enable PHP intellisense on Visual Studio ?
You can use VS.PHP to get php in similar VS environment. (Commercial)
Introducing the next generation of PHP
development tool Rich intellisense and
debugging support Easy to get started
with built-in PHP web server
Or Free alternative:
Php4VS
The Php4VS is a Package for Visual
studio which aims to do the same thing
as some others do, but with one
difference : for FREE !
Use Netbeans as an "extension".
1. install netbeans
2. In visual studio, right-click on a php file and select open with. Add new.., and select Netbeans.exe in the bin folder in the Netbeans installation folder. Click OK and also set as default.
Now, just for php files, they'll open in netbeans. It's probably the best solution for now especially with the Express editions which don't allow 3rd party extensions.
Note: you most likely want to set netbeans to use utf-8 so you won't have problems including php files in other files. to do that:
Go to "etc" folder in Netbeans Installatin folder. Open netbeans.conf file and add on netbeans_default_options following line:
-J-Dfile.encoding=UTF-8
What about PHP tools for Visual Studio?
Visual Studio does not natively support PHP as a language. However there do appear to be third party which provide extensions for PHP that provide intellisense (among other features)
http://www.jcxsoftware.com/vs.php
I was having an issue when converting my HTML files to PHP, there was no intellisense available at all - not even for the HTML portions. To fix this, R-click the PHP file in Solution Explorer and select Open With... , then select "HTML Editor" and "Set as Default". It won't give PHP support, but it brought back HTML intellisense for me.

PHP syntax highlighting in Visual Web Developer?

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.
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.
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/
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.
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
thx, I use the last post with "HTML format" instead "automatic editor selector"
I would recommend using Netbeans. It has code completion for PHP and runs xdebug for debugging. I've been using it for over a year and the support for PHP just keeps getting better.
Definitely worth trying.
I would recommend Visual Studio with this Extension :
http://phalanger.codeplex.com/
It is free and gives you more functionality than most of the expensive tools.
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.
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.
What I used is the PHP Designer 2007 - Personal Version 5.0.2 is a fully functional php editor, for free! from mpsoftware[dot]dk/, however I like using MSVWD a lot too, and now that I've seen how to make php files work in it, I gonna stick with that! Thanks!
btw Aptana Studio looks promising too tho
The closest Visual Studio like PHP environment I have found yet is CodeLobster. It has a free version for PHP and CSS, as well as for pay versions that include for the Pro version a plug-in for CakePHP, CodeIgniter, Drupal, Facebook, JQuery, Joomla, Smarty, Symfony, WordPress and Yii.
It isn't perfect, but it is pretty good and free for the basic version.

PHP in Visual Studio

I'm deving PHP at the moment using Visual Studio as my IDE. I've installed the Phalanger Visutal studio integration to get PHP projects etc but I want VS to recognise the PHP start and end tags like the standard ASP ones.
i.e when I type <% %> into the html editor, I want the PHP tags to behave the same <? ?>
I've fiddled in the "Tag Specific Options" and created a tag called ?, but it shows the closing tag wrong, like <? /?>
Can it be done?
Cheers
Tim
You can try Vs.php.
You can also try PHP Tools for Visual Studio. Phalanger integration now is also built on top of it.
I guess I don't really think of Visual Studio is a good place to code PHP, but maybe that's just me. I would much rather use DreamWeaver, or even Notepad++ (free) which does syntax highlighting, and more.
Is there a specific reason you want to use Visual Studio for PHP? Usually VS is for Microsoft languages like C#, VB, C++, .NET, etc.
Is there some specific reason you have to use VS? If not, I'd highly recommend you try Eclipse with PDP, Netbeans, or Aptana. All three are excellent free IDE's for PHP that are extensible and offer versions specifically tailored to PHP development.
I do work in .Net and agree VS is an excellent IDE, but the alternatives listed above are equally feature rich and better tailored to coding in PHP.
use VS.php on your VS standard edition or above

Categories