Ⅰ. 插件描述
Regular Expression Developer for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'raimondi/vimregex-vim-speak-now'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'raimondi/vimregex-vim-speak-now'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'raimondi/vimregex-vim-speak-now'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/raimondi/vimregex.vim
Ⅳ. 文档说明
This is a fork of http://www.vim.org/scripts/script.php?script_id=1091
Start with one of the commands
:Vimrex
or
:VimRegEx
The first opens within the current (g)vim session, the second starts a new (g)vim
'z?' or the menu 'Usage' button opens a usage buffer.
VimRegEx.vim is a plugin that aids in development/construction/analysis of Vim regular expressions. It is not a search utility, although it certainly does that. It is a development/learning environment that allows writing Vim regular expressions, element-by-element analysis of these expressions, and execution of the expressions against source text with the results illustrated both verbally in text and graphically in different highlighting for different types of regular expression atoms.
It allows you to see, in verbal/graphical analytical terms, just what is being searched for and what will result with a given Vim regular expression.
There are comparable tools on the net for other environments (notably .NET, Perl, and Python), but nothing exists for Vim ... until now!
The plugin is written specifically for Vim, so you can build your regular expressions as you would in Vim. In other tools, you'd have to make allowances for backslash escaping specific elements (like '(', ')', '+', '?', etc.) to use what you had developed in those tools. You'd also have to make substitutions, like '<' for 'b' for word boundary ('b' has its own meaning in Vim), and '(...)@=' for '(?=...)'. This renders these other tools all but useless for Vim.
VimRegEx has its own built in documentation, a rich set of variables for tuning its performance/appearance to your liking in your vimrc, an easy menu driven interface for gvim as well as easy to use keyboard mappings for the same commands in vim. There's also file generation capability to save your windows in text or html.
If you've been struggling with a regular expression and can't seem to get it to do what you want, maybe what you think you're doing isn't what Vim sees. See what Vim sees in VimRegEx. In the VimRegEx enviroment, what you see is what you get!