Ⅰ. 插件描述
vim etpl syntaxⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'hushicai/vim-etpl'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'hushicai/vim-etpl'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'hushicai/vim-etpl'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/hushicai/vim-etpl
Ⅳ. 文档说明
# vim-etpl
vim etpl syntax
basic
默认仅支持.etpl后缀,如果你想在其他后缀中使用,很简单,指定一行modeline就行:
<!-- vim: set ft=etpl ts=4 sw=4 sts=4 tw=120 fdm=indent: -->
customize
可以通过配置以下选项改变etpl的起始串和结束串,比如类似mustache:
" 默认为`<!--`
let g:etpl_command_open='{{#'
" 默认为`-->`
let g:etpl_command_close='}}'
" 默认`${`
let g:etpl_variable_open='<%'
" 默认`}`
let g:etpl_variable_close='%>'
当然,不能保证所有配置都能work!
snippets
Make sure you have SirVer/ultisnips installed.

matchit
Make sure you have vim-scripts/matchit.zip installed.
