Ⅰ. 插件描述
HTML and CSS validation for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'arunsahadeo/webval'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'arunsahadeo/webval'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'arunsahadeo/webval'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/arunsahadeo/webval
Ⅳ. 文档说明
# webval.vim
HTML and CSS validation plugin for Vim using the W3C Validator API.
How to install
Using Vim Plug:
Add the following to your .vimrc file:
``
Plug 'arunsahadeo/webval'
``
Using Vundle:
Add the following to your .vimrc file:
``
Plugin 'arunsahadeo/webval'
``
Installing manually:
Place the plugin file somewhere under your ~/.vim folder and add the following to your .vimrc file:
`set rtp+=~/.vim/
runtime /path/to/webval.vim`
Note: you will also need jq installed and available on your $PATH variable.
Commands:
:ValiHTML - Validates any HTML contained in the file currently open in the buffer if it corresponds to one of the whitelisted filetypes
:ValiCSS - Validates any CSS contained in the file currently open in the buffer if it has a .css extension
:PurgeFiles - Deletes the JSON file generated by the ValiCSS command, or the JSON / HTML files generated by the ValiHTML command (a HTML file will be generated if you use :ValiHTML on a whitelisted PHP file)