Vim - Activiting HTML snippets on PHP files

前端 未结 2 1715
悲&欢浪女
悲&欢浪女 2020-12-30 13:57

I am using vim and snipMate, many times I need to name the HTML files to PHP, just because of 1 or 2 lines of code.

I every time I create a PHP file vim takes it as

2条回答
  •  悲&欢浪女
    2020-12-30 14:34

    You have an uppercase E in your example. The following should work on one line:

    au BufRead,BufNewFile *.php set ft=php.html
    

提交回复
热议问题