diff --git a/plugin/grepper.vim b/plugin/grepper.vim index 01dfa51..6fe8c27 100644 --- a/plugin/grepper.vim +++ b/plugin/grepper.vim @@ -547,6 +547,14 @@ function! s:query2vimregexp(flags) abort endif let vim_query = '\V'. vim_query else + " if tool escapes { and }, then unescape them + let tool = s:get_current_tool(a:flags) + if match(tool.escape, '{') != -1 + let vim_query = substitute(vim_query, '\\{', '{', 'g') + endif + if match(tool.escape, '}') != -1 + let vim_query = substitute(vim_query, '\\}', '}', 'g') + endif " \bfoo\b -> \ Assume only one pair. let vim_query = substitute(vim_query, '\v\\b(.{-})\\b', '\\<\1\\>', '') " *? -> \{-}