I'm trying to setup folding for Abaqus/Calculix inp files.

The format is basically as follows: keywords are represented as * and it's contents are what follows. This is quite like org-mode.

So far I've tried origami but the results are not satisfactory. It either folds blocks delimited by {} or indented blocks, while neither of which are really necessary here.

I already have a basic major-mode setup for syntax highlighting. I'd like to know what I need to add so that I can emulate org like folding.

Vim, however, manages this off-the-shelf.

  • 1
    Org-mode uses outline-minor-mode. The variable outline-regexp controls what portion of texts are folded. – Tobias Aug 13 '20 at 11:19
  • Thanks a lot! outline-toggle-children is exactly what I was looking for. – Nidish Narayanaa Aug 13 '20 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.