Home Download Buy Blog Forum Support

Code folding python

Code folding python

Postby sylvain.berger on Tue Feb 05, 2013 9:35 pm

I have a problem with python code folding.
Consider these 2 functions:

Code: Select all
def foo(arg1,
        arg2,
        arg3):
    call1()
    call2()

def foobar(arg1, arg2, arg3):
    call1()
    call2()


when folded they end up like this:
Code: Select all
def foo(arg1, [...]
    call1()
    call2()

def foobar(arg1, arg2, arg3): [...]


As you can see having arguments on multiple lines is breaking the code folding.
Anyone know if this can be fixed by modifying a file somewhere?

Thanks
sylvain.berger
 
Posts: 5
Joined: Wed Sep 07, 2011 7:09 pm

Re: Code folding python

Postby sublimator on Wed Feb 06, 2013 3:56 am

Folding isn't really syntax aware, it just uses some simplistic indentation heuristics.

I guess the only way you'll have much luck is via writing a plugin.
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 9 guests