Ⅰ. 插件描述
Twig syntax highlighting, indentation, neocomplete and UltiSnips snippets in VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'nelsyeung/twig-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'nelsyeung/twig-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'nelsyeung/twig-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/nelsyeung/twig.vim
Ⅳ. 文档说明
# 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)
Setup the neobundle package
managerSet the bundles for twig.vim
NeoBundle 'nelsyeung/twig.vim'- Open up Vim and start installation with
:NeoBundleInstall
Vundle
- Setup the vundle package manager
Set the bundles for twig.vim
Plugin 'nelsyeung/twig.vim'- Open up Vim and start installation with
:PluginInstall
Manual (not recommended)
- Download the twig.vim files
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.