eregex.vim


Ⅰ. 插件描述

Perl/Ruby style regexp notation for Vim

Ⅱ. 基本信息

创建日期:  2010-10-15
使用用户:  211
Github星:  161
插件作者:  wei ko kao

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'othree/eregex-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'othree/eregex-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'othree/eregex-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/othree/eregex.vim

Ⅳ. 文档说明

# eregex.vim

Installation

It is recommended to install the script using [Vundle][] or [pathogen][].

Quick Start

After installation, just press / or ? as usual.
This will map to :M/ command, which is used to perform the PCRE search.

You can call eregex#toggle funtion to toggle the keymapping. For example,
add the following line into your .vimrc file:

nnoremap <leader>/ :call eregex#toggle()<CR>

Then you can use <leader>/ to toggle the eregex.vim.

For replacement, use :%S// (uppercase S) to trigger perl style regexp.

See :help eregex for more information.

Config

To disable the script by default, put this line in your .vimrc file:

let g:eregex_default_enable = 0

To change the search delimiter to something else than the default / and ?,
following options can be used:

let g:eregex_forward_delim = '/'
let g:eregex_backward_delim = '?'

To force case sensitive like perl re. Add the following config:

let g:eregex_force_case = 1

Then you will have case sensitive match by default. You can always change it by adding /i modifier.

Changes

2.62

  • Support ignorecase, smartcase. Add force case sensitive mode.

2.61

  • Support for ignorecase

2.60

  • Support for the backword search.
  • Support for the count argument.
  • Use function to auto map keys.
  • Support for custom search delimeters.
  • hlsearch works fine.

License

Author : 安久津
Origin : eregex.vim
Maintainer : othree

See :help eregex-license-to-use for license information.

添加新评论