help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Folding yaml by markers


From: Robert Pluim
Subject: Re: Folding yaml by markers
Date: Mon, 14 Oct 2019 15:02:38 +0200

>>>>> On Fri, 11 Oct 2019 16:41:07 +0200, Hartmut Goebel <address@hidden> said:

    Hartmut> Hello,
    Hartmut> I have to deal with some YAML documents, which use some kind of
    Hartmut> "literate programming": The comments contain documentation for the
    Hartmut> values. These files already contain fold markers `[[[` and `]]]`
    Hartmut> provided by the mainterner (who uses vim).

    Hartmut> I want to leverage these fold markers for emacs, by adjusting
    Hartmut> hs-special-modes-alist, but did not manage.  The blocks are folded 
by
    Hartmut> yaml-structure, not by fold marks.

    Hartmut> Any idea how do I need to set hs-special-modes-alist?

    Hartmut> Here is my code:

    Hartmut>  (defvar hs-special-modes-alist
    Hartmut>    (mapcar 'purecopy
    Hartmut>     '((yaml-mode "[[[" "#\s+]]]" nil))))

You probably want to use 'setq' rather than 'defvar'.

Robert



reply via email to

[Prev in Thread] Current Thread [Next in Thread]