If you have TextMate 1.1b11 installed and is coding with PHP, then please visit [ http://www.imediatec.co.uk/tm/phpcc/ ] and help out testing a new PHP Code Completion solution for TM.
All 3653 php functions supported with completions, snippets, tooltip information and full PHP Online documentation inside TM.
Please note! This bundle is still in development, so please let me know what you would like to have added, changed, etc. etc.
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -
Does it in some extent use the new feature Allan wrote about ?
It's now possible to disable the default completion (which currently gather words from current document which has prefix of current word) and additionally set a completion command which is called with $TM_CURRENT_WORD set to the word that needs to be completed and should write a list of matches to stdout. For example to change the completion to only suggest internal PHP functions we could make the following setting: completionCommand = 'php -r '$a = get_defined_functions(); print_r(implode("\n", $a["internal"]));'|grep "^$TM_CURRENT_WORD"| sort'; disableDefaultCompletion = 1;
Because this method is damn great !
On 1 juin 05, at 17:18, Mats Persson wrote:
If you have TextMate 1.1b11 installed and is coding with PHP, then please visit [ http://www.imediatec.co.uk/tm/phpcc/ ] and help out testing a new PHP Code Completion solution for TM.
All 3653 php functions supported with completions, snippets, tooltip information and full PHP Online documentation inside TM.
Please note! This bundle is still in development, so please let me know what you would like to have added, changed, etc. etc.
Kind regards,
Mats
"TextMate, coding with an incredible sense of joy and ease"
- www.macromates.com -
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 1 Jun 2005, at 16:25, Dominique PERETTI wrote:
Does it in some extent use the new feature Allan wrote about ?
For example to change the completion to only suggest internal PHP functions we could make the following setting: completionCommand = 'php -r '$a = get_defined_functions(); print_r(implode("\n", $a["internal"]));'|grep "^$TM_CURRENT_WORD"| sort';
Because this method is damn great !
Dominique, Yes it does, but don't take my word for it try the bundle.
Please Note! Allan's completion command above is limited to the number of functions available in your PHP installation. OS X Default = 915 Entropy.ch PHP 5.0.4 = 1782
but the PHPCodeCompletion bundle supports all 3653 functions.
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -
Nice!
I'll take a go at it today and let you know how it goes.
Just installed it and it's working real nice like.
-steve
Mats Persson wrote:
If you have TextMate 1.1b11 installed and is coding with PHP, then please visit [ http://www.imediatec.co.uk/tm/phpcc/ ] and help out testing a new PHP Code Completion solution for TM.
All 3653 php functions supported with completions, snippets, tooltip information and full PHP Online documentation inside TM.
Please note! This bundle is still in development, so please let me know what you would like to have added, changed, etc. etc.
Kind regards,
Mats
"TextMate, coding with an incredible sense of joy and ease"
- www.macromates.com -
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 6/1/05, Mats Persson mats@imediatec.co.uk wrote:
If you have TextMate 1.1b11 installed and is coding with PHP, then please visit [ http://www.imediatec.co.uk/tm/phpcc/ ] and help out testing a new PHP Code Completion solution for TM.
nice! this is really cool, Mats. Works great too. I love code completion.
One suggestion : since the phpcc.lookup.php file has 3,000+ lines of array declarations, try regenerating it all as one big array instead. I think you will notice a speed increase. What I mean is, instead of :
$_LOOKUP = array( ); $_LOOKUP["abs"] = array( "methodname" => "abs", ... ); $_LOOKUP["acos"] = array( "methodname" => "acos" ... );
make it :
$_LOOKUP = array( 'abs' => array( 'methodname' => 'abs' ... ), 'acos' => array( ... ), ... );
because otherwise, the PHP parser would be looking up '_LOOKUP' in the global symbol table 3,000 times instead of once :(
I am on a dual G4 here anyway so I only notice a slight lag when it first hits the lookup script ... still very usable.
_
well, when a few other people have tested it, I think you should definitely add this to the Bundles repos
K
On 1 Jun 2005, at 19:33, Kumar McMillan wrote:
nice! this is really cool, Mats. Works great too. I love code completion.
It's kind of nice actually, and now I want it in every language I'm working in !! (some already in progress)
One suggestion : since the phpcc.lookup.php file has 3,000+ lines of array declarations, try regenerating it all as one big array instead. I think you will notice a speed increase. What I mean is, instead of:
$_LOOKUP = array( ); $_LOOKUP["abs"] = array( "methodname" => "abs", ... ); $_LOOKUP["acos"] = array( "methodname" => "acos" ... );
make it :
$_LOOKUP = array( 'abs' => array( 'methodname' => 'abs' ... ), 'acos' => array( ... ), ... );
because otherwise, the PHP parser would be looking up '_LOOKUP' in the global symbol table 3,000 times instead of once :(
Cheers, didn't know about that one. Will try to do so then. I'm also playing with the idea of loading smaller subsets of the array based on the first letter of the (completed) word. So in the case of completions of array* we would load the A file (with only functions starting with A) which is 36Kb rather than 1.1Mb. Should speed things up as well.
I am on a dual G4 here anyway so I only notice a slight lag when it first hits the lookup script ... still very usable.
Mostly concerned about G4 laptops, so I'd be very interested in users with them. (got iMac G5 myself)
well, when a few other people have tested it, I think you should definitely add this to the Bundles repos
Yes, this together with some other functions in the "development lab", full PHP-Smarty support and more should make developing in PHP much better and faster.
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -