Ⅰ. 插件描述
Highlighter for JavaScript regex syntax, like RegexPalⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'slevithan/regex-colorizer'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'slevithan/regex-colorizer'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'slevithan/regex-colorizer'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/slevithan/regex-colorizer
Ⅳ. 文档说明
# Regex Colorizer
Adds syntax highlighting to regular expressions for readability. Currently, only the JavaScript regex flavor is supported, with extensions for web reality. Any regex features not supported by JavaScript are marked as errors, along with some edge cases that cause cross-browser grief.
Use the following code to run Regex Colorizer for all elements on a page with class regex:
// Don't run this line if you provide your own stylesheet
RegexColorizer.addStyleSheet();
// Can provide a class name for elements to process (defaults to 'regex')
RegexColorizer.colorizeAll();There is also a RegexColorizer.colorizeText() method that returns HTML with highlighting for the provided regex pattern string.
See Regex Colorizer's website for examples and more details.
About
Regex Colorizer copyright 2010-2012 by Steven Levithan.
Released under the MIT License.
Fork me to show support, fix, and extend.