sponsor Vim development Vim logo Vim Book Ad

eregex.vim : Perl/Ruby style regular expression

 script karma  Rating 60/18, Downloaded by 1427  Comments, bugs, improvements  Vim wiki

created by
wei ko kao
script type
# Introduction


In this tip. I introduced a plugin to help you use Perl style regular expression in Vim.
But the maintainer is disappear. And the default package is not easy to install.
So I start to maintain it.

Repo: http://github.com/othree/eregex.vim

## Quick Start

After installed. Just press / or ? for search, it will map to :M command.
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 eregex.vim.
For replacement, use :%S// (uppercase S) to use perl style regexp.

See :help eregex for more information.

## Config

Default disable, put this line in vimrc:

    let g:eregex_default_enable = 0

Custom search delimeter:

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

# Attribute

Author : 安久津
install details
Use Vundle or pathogen is suggested.

Use vimball package.
Open it with Vim and execute :so % .

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
eregex.vim-2.60.vmb 2.60 2013-02-24 7.0 wei ko kao Support backword search.
Support count argument.
Use function to auto map keys.
Define custom search delimeter.
hlsearch works fine.
eregex.vim-2.56.vba 2.56 2011-07-27 7.0 wei ko kao Update to correct vimball file
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
OSDN.net Logo