How to achieve code folding effects in Emacs?

后端 未结 14 2233
眼角桃花
眼角桃花 2020-11-30 16:15

Whats the best way to achieve something like code folding, or the type of cycling that org-mode uses. What would be the best solution in elisp to create this type of behavi

14条回答
  •  生来不讨喜
    2020-11-30 16:57

    I am surprised that noone mentioned narrowing-widening. It's super awesome, it comes bundled with emacs as well. Simply select code you want to focus on and press C-x n n, to go back to full view mode just do C-x n w. I always prefer to use built-in emacs functionality than clutter my user space with another package. If emacs can do it with built-in functionality then I'll prefer that over some third party package, but that's just me, doesn't mean or imply anything else besides that I like simple stuff over complex long configs.

提交回复
热议问题