Folding In Non-Org Buffers

Marcin Borkowski (mbork) really likes being able to cycle folding in Org buffers. Of course, then he wanted to be able to do the same thing in any buffer. In particular, he wanted to be able to fold and unfold groups of functions as a set. He experimented with all sorts of solutions including the builtin outline minor mode.

None of them were quite what he wanted. Then he found outli. It was perfect for his needs. It’s a third party package but appears to be well maintained and is less than 400 lines of code. What he really likes, though, is the keybindings. Most important to him is that Tab cycles the folding just like in Org mode.

Although I like and use headline folding in Org mode, I’ve never been able warm up to code folding. On those rare occasions when I want to narrow focus to a single function—usually to delimit searches—I simply narrow to the function or region in question. Of course, others, like mbork, disagree and those folks may want to check out mbork’s post to get the details of his solution.

This entry was posted in General and tagged . Bookmark the permalink.