-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Hi, I'm using the (newest) PHP-Package and I would like to color normal comments other then phpdoc comments. So I changed the PHP Language a bit to perform this. I replace the normal comment.block.php with this one:
{ name = 'comment.block.php.phpdoc'; begin = '/**'; end = '*/'; patterns = ( { name = 'keyword.other.phpdoc.php'; match = '@(a(ccess|uthor)|c(ategory| opyright)|global|li(cense|nk)|pa(ckage|ram)|return|s(ee|ince|tatic| ubpackage)|t(hrows|odo)|v(ar|ersion))\b'; } ); }, { name = 'comment.block.php'; begin = '/*'; end = '*/'; },
So I have an own scope for the phpdoc comment. I also added @license as phpdoc keyword. It would be nice if you could add this changes to the official PHP-Package.
I also have another question: How can I activate the spell-check in (PHP)comments. I tried to use a Preference Item and added { spellChecking = 1; } to it and set the scope to "comment" but it didn't worked. Do you have any ideas?
Thanks in advance, Simon Ruderich - ----
privacy is necessary using http://gnupg.org public key id: 0x6115F804EFB33229 http://ruderich.com/
simonruderich.asc
On 20. Oct 2006, at 19:03, Simon Ruderich wrote:
[...] So I have an own scope for the phpdoc comment. I also added @license as phpdoc keyword. It would be nice if you could add this changes to the official PHP-Package.
Done, though I made the scope name comment.documentation.phpdoc.php. We have already established comment.documentation as a scope, though in retrospect it probably should have been comment.block.documentation (yeah, I actually defended it half a year ago [1]).
We will probably do a global search and replace on all grammars one of these days.
Also, I made the begin match: '/**(?!/) (so /**/ doesn’t falsely start a doc comment).
[1] http://lists.macromates.com/pipermail/textmate/2006-April/ 009849.html
I also have another question: How can I activate the spell-check in (PHP)comments. I tried to use a Preference Item and added { spellChecking = 1; } to it and set the scope to "comment" but it didn't worked. Do you have any ideas?
It should work, and it works for me. Be sure you have closed the bundle editor after making the change, and it may not immediately affect your open files (so try create a new file and test there).
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On 21.10.2006, at 08:28, Allan Odgaard wrote:
On 20. Oct 2006, at 19:03, Simon Ruderich wrote:
[...] So I have an own scope for the phpdoc comment. I also added @license as phpdoc keyword. It would be nice if you could add this changes to the official PHP-Package.
Done, though I made the scope name comment.documentation.phpdoc.php. We have already established comment.documentation as a scope, though in retrospect it probably should have been comment.block.documentation (yeah, I actually defended it half a year ago [1]).
We will probably do a global search and replace on all grammars one of these days.
Also, I made the begin match: '/**(?!/) (so /**/ doesn’t falsely start a doc comment).
[1] http://lists.macromates.com/pipermail/textmate/2006-April/ 009849.html
Thanks, but now I got another problem. If I'm in a phpdoc and press Enter no * in the next line is entered as usual. I don't know why but I think it's a problem with the scope name. It worked for me with 'comment.block.php.phpdoc', but I don't know why. If I remember correctly it didn't worked with 'comment.block.phpdoc.php'. Could you please look into it.
I also have another question: How can I activate the spell-check in (PHP)comments. I tried to use a Preference Item and added { spellChecking = 1; } to it and set the scope to "comment" but it didn't worked. Do you have any ideas?
It should work, and it works for me. Be sure you have closed the bundle editor after making the change, and it may not immediately affect your open files (so try create a new file and test there).
I got it working now, I forgot to enable "Check Spelling As You Type"; thought I had it enabled. Sorry for that.
Thanks, Simon Ruderich - ----
privacy is necessary using http://gnupg.org public key id: 0x6115F804EFB33229 http://ruderich.com/
simonruderich.asc
On 21. Oct 2006, at 12:35, Simon Ruderich wrote:
Thanks, but now I got another problem. If I'm in a phpdoc and press Enter no * in the next line is entered as usual. I don't know why but I think it's a problem with the scope name. It worked for me with 'comment.block.php.phpdoc', but I don't know why. If I remember correctly it didn't worked with 'comment.block.phpdoc.php'. Could you please look into it.
There is no such behavior by default, so you must have added it locally, and scoped it to just comment.block. You would need to add comment.documentation to the scope selector of this custom command.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On 22.10.2006, at 00:03, Allan Odgaard wrote:
On 21. Oct 2006, at 12:35, Simon Ruderich wrote:
Thanks, but now I got another problem. If I'm in a phpdoc and press Enter no * in the next line is entered as usual. I don't know why but I think it's a problem with the scope name. It worked for me with 'comment.block.php.phpdoc', but I don't know why. If I remember correctly it didn't worked with 'comment.block.phpdoc.php'. Could you please look into it.
There is no such behavior by default, so you must have added it locally, and scoped it to just comment.block. You would need to add comment.documentation to the scope selector of this custom command.
I'm using the subversion version of the "Text" bundle and there is a snippet "Continue Star Bullet". And if I press enter in a normal PHP Comment then it works:
/* * * <=== I press enter here for example and then I get a new line with a star and a intention */
But with the new scope name it doesn't work anymore. Could you check this please.
Regarding my last email, could you please add the @uses keyword to the phpdoc language grammar? Thanks in advance, Simon Ruderich - ----
privacy is necessary using http://gnupg.org public key id: 0x6115F804EFB33229 http://ruderich.com/
simonruderich.asc
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On 22.10.2006, at 21:14, Simon Ruderich wrote:
I'm using the subversion version of the "Text" bundle and there is a snippet "Continue Star Bullet". And if I press enter in a normal PHP Comment then it works:
/*
- <=== I press enter here for example and then I get a new line
with a star and a intention */
But with the new scope name it doesn't work anymore. Could you check this please.
Regarding my last email, could you please add the @uses keyword to the phpdoc language grammar? Thanks in advance, Simon Ruderich
I don't know what I did there, but after an update it stopped working and I added it myself. Sorry for this.
Sorry to bother you again with phpdoc but could you please add @deprecated and @final to the keywords in the PHP bundle too? Thanks in advance, Simon - ----
privacy is necessary using http://gnupg.org public key id: 0x6115F804EFB33229 http://ruderich.com/
simonruderich.asc
I'm using the subversion version of the "Text" bundle and there is a snippet "Continue Star Bullet". And if I press enter in a normal PHP Comment then it works:
/*
- <=== I press enter here for example and then I get a new line
with a star and a intention */
I don't know what I did there, but after an update it stopped working and I added it myself. Sorry for this.
Must have missed this message the first time though, that would be because it's not using that command at all, the PHP bundle overrides that for the PHP context. But it was scoped to comment.block.php, and your doc comments are comment.block.documentation… so it wasn't matching. Just changed it to "source.php comment.block" so now it should work for both cases.
Sorry to bother you again with phpdoc but could you please add @deprecated and @final to the keywords in the PHP bundle too?
I'll let allan do that. :)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On 14.11.2006, at 07:57, Michael Sheets wrote:
I'm using the subversion version of the "Text" bundle and there is a snippet "Continue Star Bullet". And if I press enter in a normal PHP Comment then it works:
/*
- <=== I press enter here for example and then I get a new line
with a star and a intention */
I don't know what I did there, but after an update it stopped working and I added it myself. Sorry for this.
Must have missed this message the first time though, that would be because it's not using that command at all, the PHP bundle overrides that for the PHP context. But it was scoped to comment.block.php, and your doc comments are comment.block.documentation… so it wasn't matching. Just changed it to "source.php comment.block" so now it should work for both cases.
Thanks, it works now.
Sorry to bother you again with phpdoc but could you please add @deprecated and @final to the keywords in the PHP bundle too?
I'll let allan do that. :)
Thanks for this too, Allan. Simon - ----
privacy is necessary using http://gnupg.org public key id: 0x6115F804EFB33229 http://ruderich.com/
simonruderich.asc
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On 21.10.2006, at 08:28, Allan Odgaard wrote:
On 20. Oct 2006, at 19:03, Simon Ruderich wrote:
[...] So I have an own scope for the phpdoc comment. I also added @license as phpdoc keyword. It would be nice if you could add this changes to the official PHP-Package.
Done, though I made the scope name comment.documentation.phpdoc.php. We have already established comment.documentation as a scope, though in retrospect it probably should have been comment.block.documentation (yeah, I actually defended it half a year ago [1]).
We will probably do a global search and replace on all grammars one of these days.
Also, I made the begin match: '/**(?!/) (so /**/ doesn’t falsely start a doc comment).
[1] http://lists.macromates.com/pipermail/textmate/2006-April/ 009849.html
I forgot to mention the key "@uses" in a phpdoc comment. Could you please add it too. Thanks in advance, Simon Ruderich - ----
privacy is necessary using http://gnupg.org public key id: 0x6115F804EFB33229 http://ruderich.com/
simonruderich.asc