I want to be able to use outline-minor-mode
to fold my use-package
blocks at convenient points. Ideally, I want to be able to fold sections following :config
, :init
, :custom
, etc. as well as definitions inside those blocks. The current value of outline-regexp
when in emacs-lisp-mode
is:
";;;;* [^ \n]\\|(\\|\\(^;;;###\\(\\([-[:alnum:]]+?\\)-\\)?\\(autoload\\)\\)"
I thought appending \\|[[:space:]]*:\\(init|config|custom\\)
to this would work, but it doesn’t. Any help would be much appreciated.
(I see there’s a related post here, but I didn’t find anything there that helped me.)
You’re matching the literal text
:init|config|custom
Tip: Use
M-x re-builder
to test.