Add plugin SimpylFold for folding of python code
kiryph opened this issue · 1 comments
IMHO SimpylFold is a better plugin for folding of python code than the listed plugin braceless.vim.
Could you add SimpylFold to the section for the filetype python? Currently, this plugin has 288 stars on github.
- [SimpylFold](https://github.com/tmhedberg/SimpylFold)
I have tried braceless.vim for folding of python code. However, it has some quirks and bugs. On the positive side: the performance is really good due to the way the plugin generates folds.
-
When opening a python file,
braceless.vim
will not define any folds on open. Therefore commands such aszm
,zM
,zr
, andzR
do not work immediately. This is documented in braceless.vim and is intendedKeystrokes such as |zM| and |zR| will only work on folds you have previously closed.
You have to fold all root folds manually to activate folds!
-
Incorrect fold levels are defined when closing all root folds in following circumstance:
The maximal foldlevel should be 3. This might be a bug and can possibly be fixed. Currently, this makes commands
zm
andzr
not really useful. -
Foldtext for methods with a decorator show only the decorator, not the name of the method, which is not what I want:
Someone who uses this plugin could probably raise a feature request for braceless.vim.
-
Another thing I like about SimpylFold that it does not fold if-blocks which I think is a good choice. braceless.vim cannot be configured to do this as well.
You make some very good points. I'll add it.
Thanks!