Giter Site home page Giter Site logo

How to enable folding ? about python-syntax HOT 4 OPEN

amigrave avatar amigrave commented on June 27, 2024
How to enable folding ?

from python-syntax.

Comments (4)

purpleP avatar purpleP commented on June 27, 2024

@amigrave I'd like to point out some things about 'trivial' indent folding.

  1. It's possible to fold more with indent folding, than with existing 'smart' foldings. For example in pycharm I'm dissatisfied that I can't fold big dictionaries, because it only folds function and classes definitions.
  2. In any language I know decently written code is properly indented. So any meaningful construct that you'd like to fold is, guess what, should be also indented. So what would syntax folding or any other folding could bring to that?

from python-syntax.

amigrave avatar amigrave commented on June 27, 2024

Hi @purpleP

Well I guess it's a matter of taste and workflow.

In my case, I don't want to fold more levels than classes and functions. For some rare exceptions such as big dictionaries I use markers which is the third token set I want to be folded along with class and def.

When I open a python file, I want all classes, functions and markers to be folded, but I would hate to have all possible indent levels folded too.

I guess we have different ways to use folding and my way would not suit your needs, but your way does not suit mine either :-)

from python-syntax.

nfnty avatar nfnty commented on June 27, 2024

SimpylFold is by far the best Python folding plugin.

from python-syntax.

amigrave avatar amigrave commented on June 27, 2024

@nfnty Thanks, looks great except for the lack of support for markers ( # {{{)

I see you're pretty active in the development of SimpylFold.
I've dropped an issue about this: tmhedberg/SimpylFold#81

from python-syntax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.