blob: 5a44e51019c4859fd6ec107e6cd31994db2b5470 (
plain) (
tree)
|
|
"
" regex_escape.vim: Operator to escape regular expression metacharacters to
" make them literal, appropriate to a configurable flavor of regular
" expression, so that:
" foo * ^bar $\ baz \ quux
" becomes:
" foo \* \^bar \$\\ baz \\ quux
"
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
if exists('loaded_regex_escape') || &compatible
finish
endif
if v:version < 700
finish
endif
let loaded_regex_escape = 1
" Set up mapping
nnoremap <expr> <Plug>(RegexEscape)
\ regex_escape#Map()
xnoremap <expr> <Plug>(RegexEscape)
\ regex_escape#Map()
|