Hello all,
What is the best way to suppress decorators from the Symbol list when doing Python development?
I'm doing some TurboGears development, which uses Python's decorator syntax heavily in spots.
In essence, the code looks like this:
@expose() def foo(self): pass
@expose() def bar(self): pass
@expose() def baz(self): pass
The problem is that when I either "Go to Symbol", or click the Symbol menu, the symbol list is littered with the @expose decorators.
Currently, the Symbol menu looks like this:
@expose foo(self) @expose bar(self) @expose baz(self)
I'd prefer for it to look like this instead:
foo(self) bar(self) baz(self)
I thought that it would be a matter of subtracting "meta.function.decorator.python" from the Symbol List scope selector, but I tried that to no avail. Any advice you can provide is appreciated
Thanks, Mike
Mike,
Thanks for sending this in. To correct this behaviour follow these steps:
1. open the bundle editor 2. create a new preference item 3. set its contents to:
{ showInSymbolList = 0; }
4. set the scope selector to:
source.python meta.function.decorator.python entity.name.function.decorator.python
That ought to do it.
Also, this has been fixed in the latest SVN.
- Alex
On 11/22/06, Mike Coyle mcoyle@botonomy.com wrote:
Hello all,
What is the best way to suppress decorators from the Symbol list when doing Python development?
I'm doing some TurboGears development, which uses Python's decorator syntax heavily in spots.
In essence, the code looks like this:
@expose() def foo(self): pass @expose() def bar(self): pass @expose() def baz(self): pass
The problem is that when I either "Go to Symbol", or click the Symbol menu, the symbol list is littered with the @expose decorators.
Currently, the Symbol menu looks like this:
@expose foo(self) @expose bar(self) @expose baz(self)
I'd prefer for it to look like this instead:
foo(self) bar(self) baz(self)
I thought that it would be a matter of subtracting "meta.function.decorator.python" from the Symbol List scope selector, but I tried that to no avail. Any advice you can provide is appreciated
Thanks, Mike
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
Two TG posts in a few minutes!
Mike, I'll add this preference item into the TG Bundle that I just sent to the list in a seperate message.
I didn't think I'd be getting new stuff to add to it so quickly.
Ed
On 23/11/06, Alexander Ross alex.j.ross@gmail.com wrote:
Mike,
Thanks for sending this in. To correct this behaviour follow these steps:
open the bundle editor
create a new preference item
set its contents to:
{ showInSymbolList = 0; }
set the scope selector to:
source.python meta.function.decorator.python
entity.name.function.decorator.python
That ought to do it.
Also, this has been fixed in the latest SVN.
- Alex
On 11/22/06, Mike Coyle mcoyle@botonomy.com wrote:
Hello all,
What is the best way to suppress decorators from the Symbol list when doing Python development?
I'm doing some TurboGears development, which uses Python's decorator syntax heavily in spots.
In essence, the code looks like this:
@expose() def foo(self): pass @expose() def bar(self): pass @expose() def baz(self): pass
The problem is that when I either "Go to Symbol", or click the Symbol menu, the symbol list is littered with the @expose decorators.
Currently, the Symbol menu looks like this:
@expose foo(self) @expose bar(self) @expose baz(self)
I'd prefer for it to look like this instead:
foo(self) bar(self) baz(self)
I thought that it would be a matter of subtracting "meta.function.decorator.python" from the Symbol List scope selector, but I tried that to no avail. Any advice you can provide is appreciated
Thanks, Mike
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
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