I would like to have automatic folds for comments in my AquaEmacs.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
have a look at hs-minor-mode
. it's not automatic though. for a more automatic approach, i guess you could customize the hideshow mode the following way:
- hide comments via
hs-hide-comments-when-hiding-all
- assign a function which hides nothing to
hs-hide-all-non-comment-function
and then - use
hs-hide-all
to hide all comments.
have not tried it. just an idea.
check out the hideshow mode page at emacswiki as well.
回答2:
You cannot have similar folds as in Vim. I could not put folds to specific lines.
However, there is an addon Auctex which gives you Emacs-folds. They are not as flexible as in Vim.
Please, inform me if you have found a better solution.