Menu

Folding by indentation

2007-05-08
2013-03-15
  • Patrik Jacoby

    Patrik Jacoby - 2007-05-08

    Hi all,

    I'm wondering if there is a possiblity to use the code identation for folding. I didn't find anything in the preferences, do I miss something ?
    If the pydev plugin didn't support this feature, maybe there is another plugin that does the job ?

    imho it would be a very nice feature.

    greets
    patrik

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2007-05-08

      Pydev currently doesn't do it... I also don't know of any plugin that does it -- you can add a feature request for it -- or maybe contribute a patch ;-)

      Cheers,

      Fabio

       
      • Patrik Jacoby

        Patrik Jacoby - 2007-05-08

        Hmm, sad thing.

        ok, I'll have a look to patch this myself. I miss my java ;)

         
        • Fabio Zadrozny

          Fabio Zadrozny - 2007-05-08

          Should not be difficult...

          Take a look at org.python.pydev/src/org.python.pydev.editor.codefolding.CodeFoldingSetter#getMarks(IDocument doc, SimpleNode ast) -- and adding a preference page for having that option would be a nice thing too.

          There's a test-case for it at org.python.pydev/tests/org.python.pydev.editor.codefolding.CodeFoldingSetterTest.

          Cheers,

          Fabio