https://github.com/othree/eregex.vim
Perl/Ruby style regexp notation for Vim
https://github.com/othree/eregex.vim
Last synced: 5 months ago
JSON representation
Perl/Ruby style regexp notation for Vim
- Host: GitHub
- URL: https://github.com/othree/eregex.vim
- Owner: othree
- Created: 2010-10-15T14:02:46.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2024-01-07T13:04:00.000Z (over 2 years ago)
- Last Synced: 2024-10-14T13:02:15.541Z (over 1 year ago)
- Language: VimL
- Homepage: http://www.vim.org/scripts/script.php?script_id=3282
- Size: 56.6 KB
- Stars: 214
- Watchers: 4
- Forks: 18
- Open Issues: 10
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# eregex.vim
## Installation
It is recommended to install the script using [Vundle][] or [pathogen][].
[Vundle]:https://github.com/gmarik/vundle
[pathogen]:https://github.com/tpope/vim-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 / :call eregex#toggle()
Then you can use / 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][origin]
Maintainer : othree
See `:help eregex-license-to-use` for license information.
[origin]:http://www.vector.co.jp/soft/unix/writing/se265654.html