Home Download Buy Blog Forum Support

Updates to PHP.tmLanguage

Updates to PHP.tmLanguage

Postby awgy on Fri Feb 03, 2012 8:47 am

Who maintains the packages included with Sublime Text 2, such as the PHP package? It appears that the language grammar is out of date.

I'm the maintainer of the PHP bundle for TextMate and have been evaluating Sublime. I noticed that you're using the PHP grammar from TextMate, but it appears to be outdated. The version shipping with Sublime (2165, anyway) doesn't have support for some of the new features from PHP 5.3 (namespaces, anonymous functions, etc.). Copying php.tmbundle/Syntaxes/PHP.plist from the current version of the TextMate bundle to ~/Library/Application Support/Sublime Text 2/Packages/PHP/PHP.tmLanguage seems to have properly updated syntax highlighting.

Any ideas on how to get the new version included?
awgy
 
Posts: 2
Joined: Wed Feb 23, 2011 7:12 pm

Re: Updates to PHP.tmLanguage

Postby jbrooksuk on Fri Feb 03, 2012 9:28 am

Email Jon :)

I don't know his email address though, perhaps jps@sublimetext.com

Do you have a link? I've always thought that the tmLanguage was out of date.
jbrooksuk
 
Posts: 781
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: Updates to PHP.tmLanguage

Postby svenax on Fri Feb 03, 2012 1:26 pm

Indeed. An update has been requested a couple of times, for instance here: http://sublimetext.userecho.com/topic/9 ... hting-bug/ Apparently Jon checks that forum occasionally, but I guess he has a lot to do.
svenax
 
Posts: 155
Joined: Tue Dec 20, 2011 12:47 pm

Re: Updates to PHP.tmLanguage

Postby jbrooksuk on Fri Feb 03, 2012 1:54 pm

Do you have a link to the tmLanguage file too?
jbrooksuk
 
Posts: 781
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: Updates to PHP.tmLanguage

Postby C0D312 on Fri Feb 03, 2012 2:26 pm

To get in touch with Jon, try support@sublimetext.com
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Updates to PHP.tmLanguage

Postby iamntz on Fri Feb 03, 2012 3:14 pm

@jb: try this https://github.com/textmate/php.tmbundl ... /PHP.plist

would be awesome if someone converts the whole package to work on windows. :D
iamntz
 
Posts: 917
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Updates to PHP.tmLanguage

Postby jbrooksuk on Fri Feb 03, 2012 3:55 pm

Awesome :D

I for one would love all of PHP to be updated, since I am by my job description a PHP developer.
jbrooksuk
 
Posts: 781
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: Updates to PHP.tmLanguage

Postby sublimator on Mon Feb 06, 2012 2:25 pm

def test__TMEnvironment():
fix
= load_fixture('t1.html', sels = [(180, 287)],
syntax = 'HTML/HTML.tmLanguage')

cmd
= TMCommand("TextMate\Commands\Go To File.plist", fix)
env
= cmd.env
assert 'TM_FILENAME' in env

assert env['TM_COMMENT_START'] == '<!-- '
assert env["TM_DO_NOT_EDIT"] == "myopic"

assert cmd.file
assert cmd.bundle.path
assert cmd.bundle.support_path

assert env['TM_MODE'] == 'HTML'


I'd started on a TextMate tmCommand runner for @kuroir but the OSX vm I had all of a sudden stopped booting one day ... only have an old version on my windows machine (tmCommand runner not much use on windows) ... will see if I can dig it up ...
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Updates to PHP.tmLanguage

Postby triplepoint on Thu Nov 29, 2012 1:37 am

For what it's worth, importing the textmate PHP.plist file as described above no longer works. It appears sometime in the last year, one of the changes that infininight submitted to textmate broke interoperability with sublimetext2:
https://github.com/textmate/php.tmbundl ... /PHP.plist

If you go back to at least this revision:
https://github.com/textmate/php.tmbundl ... /PHP.plist

The import will work as expected. I haven't figured out what actually causes the break.

Out of curiosity, how much help/interest has Textmate provided in the past for fixing this sort of thing?
triplepoint
 
Posts: 1
Joined: Thu Nov 29, 2012 1:31 am

Re: Updates to PHP.tmLanguage

Postby LONGMAN on Tue Mar 05, 2013 1:35 am

AutoBackups: ST2 / ST3
CodeFormatter: ST2 / ST3
StringUtilities: ST2 / ST3
LONGMAN
 
Posts: 68
Joined: Mon Nov 26, 2012 5:03 pm
Location: Tbilisi, Georgia


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 5 guests