Twig syntax highlighting, indentation, neocomplete and UltiSnips snippets in Vim
To install twig.vim and other Vim plug-ins it is recommended to use one of the popular package managers for Vim, rather than installing by drag and drop all required files into your .vim folder.
-
Setup the neobundle package manager
-
Set the bundles for twig.vim
NeoBundle 'nelsyeung/twig.vim'
-
Open up Vim and start installation with
:NeoBundleInstall
-
Setup the vundle package manager
-
Set the bundles for twig.vim
Plugin 'nelsyeung/twig.vim'
-
Open up Vim and start installation with
:PluginInstall
- Download the twig.vim files
- Put files in your Vim directory (usually
~/.vim/
or%PROGRAMFILES%/Vim/vimfiles
on Windows)
This package does not include the old snipMate snippets in favour of Neosnippet. Follow the instructions on their page to get snippets working. Although a neosnippet-snippets have the snippets from this package, it might not be the latest version. To have the latest snippets working, you can add to your .vimrc
let g:neosnippet#snippets_directory='~/.vim/bundle/twig.vim/neosnippets'
- Better filetype detection. Detect html.twig, js.twig differently. This will need to change both ftdetect and indent files.
- More useful snippets.