sponsor Vim development Vim logo Vim Book Ad

eregex.vim : Perl/Ruby style regular expression

 script karma  Rating 68/20, Downloaded by 2163  Comments, bugs, improvements  Vim wiki

created by
wei ko kao
 
script type
utility
 
description
# Introduction

http://vim.wikia.com/wiki/Perl_compatible_regular_expressions

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: 216.73.216.103

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github