Vim - Activiting HTML snippets on PHP files

前端 未结 2 1703
悲&欢浪女
悲&欢浪女 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
    
    0 讨论(0)
  • 2020-12-30 14:37

    You will need to make it two separate directives.

    au BufRead *.php set ft=php.html
    au BufNewFile *.php set ft=php.html
    
    0 讨论(0)
提交回复
热议问题