VIM syntax highlighting of html nested in yaml

前端 未结 4 2109
臣服心动
臣服心动 2021-01-04 06:38

Given a yaml file that contains html, like this:

template        : |+ 
    
Hello, world

Is

4条回答
  •  时光取名叫无心
    2021-01-04 07:09

    It looks like you want to move the start pattern to the beginning of the next line:

    template        : |+  
    #{{{html
        
    Hello, world
    #html}}}

    More details:

    I'm on WinXP, but I saw almost the same behavior that you described.

    When in a file with filetype yaml, after calling TextEnableCodeSnip I didn't see a change until I moved the start pattern down the the beginning of the next line. I was able to see the syntax highlighting work in a file with no filetype though, so this still a chance this won't work for you.

提交回复
热议问题