George Crawford wrote:
Hi all,
New TextMate user here. I will be using it in the main for PHP development. I understand that when writing PHP scripts that include portions of HTML outside the PHP tags, one should set the document language to HTML. This makes sense. However, for PHP files with no HTML portions (such as I am working on), should I set the language to HTML or PHP? Can you explain the difference, and the benefits or drawbacks of each option?
George,
When setting the language to PHP, you get the full range of Syntax highlighting, code folding, etc. When in HTML mode, you get the syntax highlighting, but that's about it. I experienced this the other day when I found out that the HTML PHP mode doesn't include code folding which is a serious drawback to me, but I can work around it...plus I don't like embedding PHP too much in my HTML :)