Jump to Symbol - multiline parameter lists

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Jump to Symbol - multiline parameter lists

dangerwillrobinsondanger
I'm not sure if this is a known issue, or if it is only Python, but the Jump to Symbol window has trouble properly displaying Python functions & methods that have multi-line parameter lists.


A function heading like this

def makeWeek(geo=AMERICAS,
             post_by=STAFF_TYPE,
             staff_types=[],
             start=S_0630_AM,
             end=E_0730_PM
             ):

Shows up in the Jump to Symbol window's table as

def makeWeek(geo=AMERICAS,             post_by=STAFF_TYPE...)


Aligning the parameter names' leading edges with the opening parenthesis tends to work better with Python linters in this situation, but kind poorly for the Jump to Symbol window.

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jump to Symbol - multiline parameter lists

Allan Odgaard-4
On 18 Jan 2017, at 16:12, じょいすじょん wrote:

> I'm not sure if this is a known issue, or if it is only Python, but
> the Jump to Symbol window has trouble properly displaying Python
> functions & methods that have multi-line parameter lists.

It should be possible to strip the whitespace via a transformation.

The system is explained in the manual here (1.x but still uses same
concept):
http://manual.macromates.com/en/navigation_overview#customizing_the_list

There is however a limitation in that TextMate will re-parse only single
lines when editing them, and this may (temporarily) throw off the symbol
list, as it updates with info from just the edited line. In other words,
multi-line symbols are not considered fully supported.

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Loading...