evidens/vim-twig — pull request #16 by benjifisher (2014-12-05 14:22:22+00:00)
Title: Use twig for non-HTML templates.

Twig can be used to create templates for anything, and this fork lets vim determine the base filetype by stripping `.twig` from the file name, instead of always using `html` for the base filetype.

For example, if I edit `foo.vim.twig`, then I want to include the ftplugins and syntax for vim, then twig. I have changed `ftdetect/twig.vim` and `syntax/twig.vim` to make this work by setting the `'filetype'` option to `vim.twig`. I also moved `ftdetect/twig.vim` to `filetype.vim` so that our autocommand comes before the default one (added in vim 7.4, I think).

If vim cannot determine the filetype, then this defaults to setting `'filetype'` to `html.twig`. I think that is what most people want, and it is similar to the existing behavior. It would be easy to make the default configurable.