I know that outline mode works like this in Emacs org mode
* Heading 1 ** Heading 2
Is it possible to configure Emacs to take a different identifier than the *
to identify headings?
I have a few files where I want to use a particular character (or character combination) where I have certain character combinations like C %% MODULE
which mark the beginning of every module within the program.
So If I have a mechanism to use the C %% MODULE
instead of *
I do not have to add additional headings to enable the folding mechanism within my program.
Which file would I have to modify to have this functionality changed?
Just to provide more clarity, my code looks as shown below
I have developed this in org mode. When I paste this into my system, I will have to manually delete the preceeding
*
and paste it.
But I was looking for a cleaner solution and if possible I could customize org-mode further to meet my requirements.
outshine
package. I use that for same kind of 'module' navigation, folding, etc in non-org code files. Here's an example. The difference in this example is that;;;
,;;;;
, .. are used as 'module' delimiters. You can configureoutshine
to match the delimiters you want. – Kaushal Modi Aug 10 '16 at 13:13outline-mode
rather thanorg-mode
, which is built on top ofoutline-mode
. If so, the least intensive option is probably to modifyoutline-regexp
and friends. – Dan♦ Aug 10 '16 at 13:16hide-show
library to create your own regexp for folding modules: emacswiki.org/emacs/HideShow – lawlist Aug 10 '16 at 14:28