Persistent :set syntax for a given filetype?

后端 未结 4 1081
失恋的感觉
失恋的感觉 2021-01-30 07:52

I\'m working on a Symfony2 project which uses Twig, and the filetypes are myfile.html.twig. Vim doesn\'t automatically detect the syntax highlighting and so applies

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-30 08:21

    au BufNewFile,BufRead,BufReadPost *.twig set syntax=HTML
    

    And add this line to ~/.vimrc to make the settings persistent.

提交回复
热议问题