How do you enable block folding for Python comments in TextMate?
Posted
by
Dave Gallagher
on Stack Overflow
See other posts from Stack Overflow
or by Dave Gallagher
Published on 2011-01-09T02:45:39Z
Indexed on
2011/01/09
2:53 UTC
Read the original article
Hit count: 261
In TextMate 1.5.10 r1623, you get little arrows that allow you to fold method blocks:
Unfortunately, if you have a multi-lined Python comment, it doesn't recognize it, so you can't fold it:
def foo():
"""
How do
I fold
these comments?
"""
print "bar"
TextMate has this on their site on how to customize folding: http://manual.macromates.com/en/navigation_overview#customizing_foldings
...but I'm not skilled in regex enough to do anything about it. TextMate uses the Oniguruma regex API, and I'm using the default Python.tmbundle updated to the newest version via GetBundles.
Does anyone have an idea of how to do this? Thanks in advance for your help! :)
© Stack Overflow or respective owner