Skip to content

nelsyeung/twig.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twig.vim

Twig syntax highlighting, indentation, neocomplete and UltiSnips snippets in Vim

Installation

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.

Neobundle (recommended)

  1. Setup the neobundle package manager

  2. Set the bundles for twig.vim

    NeoBundle 'nelsyeung/twig.vim'
  3. Open up Vim and start installation with :NeoBundleInstall

Vundle

  1. Setup the vundle package manager

  2. Set the bundles for twig.vim

    Plugin 'nelsyeung/twig.vim'
  3. Open up Vim and start installation with :PluginInstall

Manual (not recommended)

  1. Download the twig.vim files
  2. Put files in your Vim directory (usually ~/.vim/ or %PROGRAMFILES%/Vim/vimfiles on Windows)

Snippets

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'

Todo

  • Better filetype detection. Detect html.twig, js.twig differently. This will need to change both ftdetect and indent files.
  • More useful snippets.