Discussion:
Python docstring folding
Rock Storm
2018-11-20 17:45:58 UTC
Permalink
Dear all,

I'm new to Emacs and I'm trying to use it (among other things) as an
IDE for Python development. However I'm struggling with code
folding. I installed 'outline-magic' [1]. Which works great but it
doesn't fold docstrings. This is something that should be addressed in
'python-mode' right? I can't be the first one to stumble across
this. What am I missing? Is there an easy way to achieve docstring
folding? Or should I be using other folding package?

[1]: https://github.com/tj64/outline-magic

Thanks a lot,
--
Rock Storm
GPG KeyID: 4096R/C96832FD
GPG Fingerprint:
C304 34B3 632C 464C 2FAF C741 0439 CF52 C968 32FD
Drew Adams
2018-11-20 18:12:03 UTC
Permalink
I'm struggling with code folding. I installed
'outline-magic'. Which works great but it doesn't
fold docstrings... Is there an easy way to achieve
docstring folding?
What do you mean by folding doc strings? What do you
want that it doesn't do?

If you just want to toggle whether doc strings (only)
are hidden, see this:

http://lists.gnu.org/archive/html/help-gnu-emacs/2018-11/msg00115.html
Rock Storm
2018-11-20 19:16:58 UTC
Permalink
Post by Drew Adams
I'm struggling with code folding. I installed
'outline-magic'. Which works great but it doesn't
fold docstrings... Is there an easy way to achieve
docstring folding?
What do you mean by folding doc strings? What do you
want that it doesn't do?
The behaviour I was expecting would be something similar to what this
plugin does [1].

[1]: https://github.com/alecthomas/SublimeFoldPythonDocstrings
Post by Drew Adams
If you just want to toggle whether doc strings (only)
http://lists.gnu.org/archive/html/help-gnu-emacs/2018-11/msg00115.html
Thanks a lot for the hint. I'll try that. However, isn't there a less
complicated way of doing it? Is it so uncommon? How did Python
developers live before you provided them with this? :P

Thanks again,
--
Rock Storm
GPG KeyID: 4096R/C96832FD
GPG Fingerprint:
C304 34B3 632C 464C 2FAF C741 0439 CF52 C968 32FD
Tomas Nordin
2018-11-26 17:04:08 UTC
Permalink
This post might be inappropriate. Click to display it.
Loading...