Comments (5)
Try :SimpylFoldDocstring!
and then reload the buffer.
This is counterintuitive behavior and the documentation is misleading; changing the configuration variable directly doesn't seem to have the intended effect. This is likely due to how we're caching folds. The command invalidates the cache, but changing the variable does not.
from simpylfold.
Try
:SimpylFoldDocstring!
and then reload the buffer.This is counterintuitive behavior and the documentation is misleading; changing the configuration variable directly doesn't seem to have the intended effect. This is likely due to how we're caching folds. The command invalidates the cache, but changing the variable does not.
Thanks for the reply. This doesn't do anything.
from simpylfold.
If that's the case, then I don't know what to tell you. It works for me when I run the command and reload.
Adding let g:SimpylFold_fold_docstring = 0
to my .vimrc
also works. However, changing the config variable after Vim has already loaded a Python buffer has no effect.
from simpylfold.
This is actually a misunderstanding on my part. It works as intended. What I thought g:SimpylFold_fold_docstring = 0
would do is not fold the docstring (and thus not the function def either), but fold the rest of the function contents so that I would always be able to see the docstring (something like below). I realize now that that is not the intended functionality, and that I'm not sure I want that anyway. It was a good exersize in learning about folding in Vim!
def a_function():
"""This is a multiline docstring
It prints out three lines of stuff
"""
+-- 3 lines: print("Some stuff")··························
from simpylfold.
I thought exactly the same thing, that the docstring would be visible but the code would be folded, because what I was looking forward is to get an overview of the code and see whether functions should be renamed.
The documentation/README needs to be updated to make this clear IMO. Like you I lost quite some time figuring why my docstrings would stay folded.
from simpylfold.
Related Issues (20)
- Folds are invalid after running formatter with ale HOT 3
- Releases Support HOT 1
- More configuration HOT 2
- SimpylFold with large modules makes basic operations slow HOT 3
- Auto close fold include current line after delete line HOT 5
- Comment BLOCKS (in file licenses)
- Plugin ceases to work if a module is named after its parent directory HOT 1
- docstring folding not working with empty line HOT 2
- Support folding long block of code by indentation? HOT 4
- Plugin is not working on Ubuntu Vi IMproved 8.0 HOT 3
- Folds only exist after using zx (E490: No fold found) when using "telescope" fzf plugin HOT 6
- Support for other languages? HOT 1
- is it possible to have only 1 line separating folds ? HOT 2
- the function/class names should have an higher contrast than the lines numbers HOT 3
- Possibility of defining custom folds? HOT 1
- Repository not found HOT 1
- Folding Code in Child Classes HOT 2
- SimpylFold won't indent top level functions HOT 4
- SimpylFold not working (E490: no fold found) on macOS Sonoma with Vundle HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simpylfold.