How to add syntax highlight for .twig on VIM?
In this simple post, I’ll teach you how to add syntax highlight for .twig on VIM. If you are working with a PHP Framework like symfony2 + vim, you probably are getting boring using .twig without any syntax highlighter right? So, follow these steps and get your twig full of colors easy:
Download both jinja.vim and htmljinja.vim for this folder ~/.vim/syntax
After that, add this on the bottom of your .vimrc file:
au BufRead,BufNewFile *.twig set filetype=htmljinj
- Restart your vim and you will see the .twig template much better!