Emacs中的代码折叠 [英] Code folding in Emacs
问题描述
Dreamweaver的一个很好的功能是任何文本行的代码折叠 - - 递归!
An excellent feature of Dreamweaver is code folding of any lines of text -- recursively!
这是非常棒的,我可以折叠任何文本或代码,不管语言。我与现有系统合作;我不会用一种语言编辑编写好的代码或代码,主要是与上帝知道的HTML混合在一起。折叠线使您更轻松,更快地理解很多。不幸的是,这是Dreamweaver中喜欢的仅功能。
It's fantastic, I can fold any text or code, regardless of language. I work with existing systems; I don't edit well-written code or code in one language etc. mostly HTML mixed with god-knows-what. Folding lines makes understanding a lot easier and quicker. Sadly, this is the only feature I like in Dreamweaver.
Emacs是否有类似目的的折叠代码?
Is there any code folding for Emacs in a similar aim?
推荐答案
有折叠模式,一个小模式。不幸的是,它是侵扰性的:你必须用专门的注释手动注释折叠,当你不使用模式时(或者与不使用它的其他人共享代码时)会混淆代码。一个更好的模式不会改变你的代码工作。
There's folding mode, a minor mode. Unfortunately it's intrusive: you have to manually annotate the folds with specialized comments, which clutter the code when you aren't using the mode (or when sharing code with others who don't use it). A better mode would not change your code to work.
让我补充一下:这有一个重复的值得一看:如何在Emacs中实现代码折叠效果。
Let me add: there's a duplicate of this that's worth a look: How to achieve code folding effects in Emacs.
这篇关于Emacs中的代码折叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!