2010-10-15 10:49:29 -04:00
|
|
|
# eregex.vim
|
|
|
|
|
2010-10-15 11:21:53 -04:00
|
|
|
## Installation
|
|
|
|
|
2014-12-20 06:18:51 -05:00
|
|
|
It is recommended to install the script using [Vundle][] or [pathogen][].
|
2010-10-15 11:21:53 -04:00
|
|
|
|
2013-02-21 01:51:27 -05:00
|
|
|
[Vundle]:https://github.com/gmarik/vundle
|
|
|
|
[pathogen]:https://github.com/tpope/vim-pathogen
|
2010-10-15 11:21:53 -04:00
|
|
|
|
2013-02-22 01:35:37 -05:00
|
|
|
## Quick Start
|
2010-10-15 11:21:53 -04:00
|
|
|
|
2014-12-20 06:18:51 -05:00
|
|
|
After installation, just press <kbd>/</kbd> or <kbd>?</kbd> as usual.
|
|
|
|
This will map to `:M/` command, which is used to perform the PCRE search.
|
2010-10-15 11:21:53 -04:00
|
|
|
|
2014-12-20 06:18:51 -05:00
|
|
|
You can call `eregex#toggle` funtion to toggle the keymapping. For example,
|
|
|
|
add the following line into your `.vimrc` file:
|
2010-10-15 11:21:53 -04:00
|
|
|
|
2013-02-22 01:30:39 -05:00
|
|
|
nnoremap <leader>/ :call eregex#toggle()<CR>
|
2013-02-21 11:17:06 -05:00
|
|
|
|
2014-12-20 06:18:51 -05:00
|
|
|
Then you can use <kbd><leader>/</kbd> to toggle the eregex.vim.
|
2013-02-21 11:17:06 -05:00
|
|
|
|
2014-12-20 06:18:51 -05:00
|
|
|
For replacement, use `:%S//` (uppercase S) to trigger perl style regexp.
|
2010-10-15 11:21:53 -04:00
|
|
|
|
2013-02-22 01:35:37 -05:00
|
|
|
See `:help eregex` for more information.
|
|
|
|
|
|
|
|
## Config
|
|
|
|
|
2014-12-20 06:18:51 -05:00
|
|
|
To disable the script by default, put this line in your `.vimrc` file:
|
2013-02-22 01:35:37 -05:00
|
|
|
|
|
|
|
let g:eregex_default_enable = 0
|
|
|
|
|
2014-12-20 06:18:51 -05:00
|
|
|
To change the search delimiter to something else than the default `/` and `?`,
|
|
|
|
following options can be used:
|
2013-02-22 03:58:57 -05:00
|
|
|
|
2013-02-22 04:17:27 -05:00
|
|
|
let g:eregex_forward_delim = '/'
|
|
|
|
let g:eregex_backward_delim = '?'
|
2013-02-22 03:58:57 -05:00
|
|
|
|
2015-01-23 00:33:45 -05:00
|
|
|
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.
|
|
|
|
|
2013-02-22 01:40:00 -05:00
|
|
|
## Changes
|
|
|
|
|
2013-09-05 04:48:21 -04:00
|
|
|
### 2.61
|
|
|
|
|
2014-12-20 06:18:51 -05:00
|
|
|
* Support for ignorecase
|
2013-09-05 04:48:21 -04:00
|
|
|
|
2013-02-22 01:40:00 -05:00
|
|
|
### 2.60
|
|
|
|
|
2014-12-20 06:18:51 -05:00
|
|
|
* Support for the backword search.
|
|
|
|
* Support for the count argument.
|
2013-02-22 01:40:00 -05:00
|
|
|
* Use function to auto map keys.
|
2014-12-20 06:18:51 -05:00
|
|
|
* Support for custom search delimeters.
|
2013-02-22 05:33:12 -05:00
|
|
|
* hlsearch works fine.
|
2013-02-22 01:40:00 -05:00
|
|
|
|
2010-10-15 11:21:53 -04:00
|
|
|
## License
|
|
|
|
|
2010-10-15 10:50:38 -04:00
|
|
|
Author : 安久津
|
|
|
|
Origin : [eregex.vim][origin]
|
|
|
|
Maintainer : othree
|
2010-10-15 10:49:29 -04:00
|
|
|
|
2014-12-20 06:18:51 -05:00
|
|
|
See `:help eregex-license-to-use` for license information.
|
2010-10-15 11:21:53 -04:00
|
|
|
|
2010-10-15 10:49:29 -04:00
|
|
|
[origin]:http://www.vector.co.jp/soft/unix/writing/se265654.html
|