Ⅰ. 插件描述
Vim omni-completion support for pug (formerly jade) template engineⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'dnitro/vim-pug-complete'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'dnitro/vim-pug-complete'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'dnitro/vim-pug-complete'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/dnitro/vim-pug-complete
Ⅳ. 文档说明
vim-pug-complete

Features
Based on official htmlcomplete.vim plugin so it completes:
- doctypes
- tags & attributes & attribute values
- fallback to javascript and css completions in related code portions
- classes and ids ( collected from style., link & @import)
Plus html5.vim data:
- html5 tags & attributes & attribute values
- SVG elements
- microdata.
- RDFa.
- WAI-ARIA.
Plus pug specific completions:
- blocks
- mixins
You could also use the following options to disable a specific attribute group:
let g:html5_event_handler_attributes_complete = 0 " Disable event-handler attributes
let g:html5_rdfa_attributes_complete = 0 " Disable RDFa attributes
let g:html5_microdata_attributes_complete = 0 " Disable microdata attributes
let g:html5_aria_attributes_complete = 0 " Disable WAI-ARIA attributeAdd to your .vimrc or filetype specific configuration ~/.vim/after/ftplugin/pug.vim
Installation
Use pathogen or plugin manager of your choise.
pathogen:
git clone https://github.com/dNitro/vim-pug-complete.git $HOME/.vim/bundleVundle:
Plugin 'dNitro/vim-pug-complete'vim-plug:
Plug 'dNitro/vim-pug-complete', { 'for': ['jade', 'pug'] }Usage
Hit <C-x><C-o> in insert mode everywhere you expect something to popup
OR
Fire up your autocomplete plugin and start typing
Related
Filetype detection, indentation and syntax highlighting:
Credits
License & Copyright
© 2016 Ali Zarifkar. All Rights Reserved.