I'm stumped again. I got > comments working for plain text documents using this method, but now I want to set // type comments for all php source. I've tried adding the following preferences to both PHP and HTML bundles, using source.php as the selector:
/* preferences */ { shellVariables = ( { name = 'TM_COMMENT_START'; value = '// '; }, { name = 'TM_COMMENT_END'; value = ''; }, { name = 'TM_COMMENT_MODE'; value = 'line'; }, ); }
Doesn't work! I've tried with .php files set to both HTML and PHP language types.
Idears?
Thanks again, Q
PS: Is it _always_ appropriate to use "HTML" as a file's language? I noticed the "Source -> View source as HTML" command doesn't work unless you select " X PHP -> Use HTML".
On 18/2/2006, at 11:19, Quinn Comendant wrote:
[...] I've tried adding the following preferences to both PHP and HTML bundles, using source.php as the selector:
Worked for me. I added a new Preferences to the PHP bundle (named it Comments), pasted your text, and then changed the scope selector to source.php.
Now when I press cmd-/ in PHP, I get // inserted at the start of the line.
Idears?
While it generally should not be necessary, you may want to try to restart TextMate. It does cache bundle items, but should flush that cache when the bundle editor is closed (after a change has been made) -- might be that somehow it wasn't.
PS: Is it _always_ appropriate to use "HTML" as a file's language?
Yes!
I noticed the "Source -> View source as HTML" command doesn't work unless you select " X PHP -> Use HTML".
That needs fixing, thanks.
On Sat, 18 Feb 2006 11:32:57 +0100, Allan Odgaard wrote:
While it generally should not be necessary, you may want to try to restart TextMate. It does cache bundle items, but should flush that cache when the bundle editor is closed (after a change has been made) -- might be that somehow it wasn't.
Aha! I wasn't closing the bundle editor after tinkering with things. Once I closed the bundle editor it worked.
Thanks again, Q