I have been trying to improve the syntax highlighting for python but have hit a road block getting the keyword "self" to highlight in functions variable declarations. Is there a set of keywords that are always matched I can put it in since it is a reserved word.
Also, is there a way to search a grammar file in the bundle editor, since finding the entries I need has slowed down my progress.
- Matt
On Fri, Jul 11, 2008 at 2:03 PM, Matt Leonberger linuxunil@gmail.com wrote:
I have been trying to improve the syntax highlighting for python but have hit a road block getting the keyword "self" to highlight in functions variable declarations. Is there a set of keywords that are always matched I can put it in since it is a reserved word.
But self is not a keyword or a reserved word, it is merely a convention. You can use any valid python name as the first parameter in a method definition and it will work just fine as long as you are consistent within that method.
Also, is there a way to search a grammar file in the bundle editor, since finding the entries I need has slowed down my progress.
You can use Edit-in-TextMate from the bundle editor and you have the full power of TextMate :-)
Brad
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Fri, Jul 11, 2008 at 2:23 PM, Brad Miller millbr02@luther.edu wrote:
On Fri, Jul 11, 2008 at 2:03 PM, Matt Leonberger linuxunil@gmail.com wrote:
I have been trying to improve the syntax highlighting for python but have hit a road block getting the keyword "self" to highlight in functions variable declarations. Is there a set of keywords that are always
matched I
can put it in since it is a reserved word.
But self is not a keyword or a reserved word, it is merely a convention. You can use any valid python name as the first parameter in a method definition and it will work just fine as long as you are consistent within that method.
Sorry I misspoke, but I would like to have "self" use a different color as well as "cls". Since that is a common idiom (at least for me).
Also, is there a way to search a grammar file in the bundle editor, since finding the entries I need has slowed down my progress.
You can use Edit-in-TextMate from the bundle editor and you have the full power of TextMate :-)
Brad
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate