ack.vim
ack.vim copied to clipboard
no highlighting when searching with regrex
Hi,
let g:ackhighlight = 1
When searching with regex, the matching searched term is not highlighted.
Ack! "TODO|FIXME|NOTE|HACK")
This is the code which is doing the highlighting
function! s:Highlight(args) "{{{
if !g:ackhighlight
return
endif
let @/ = matchstr(a:args, "\\v(-)\@<!(\<)\@<=\\w+|['\"]\\zs.{-}\\ze['\"]")
call feedkeys(":let &hlsearch=1 \| echo \<CR>", "n")
endfunction "}}}
Have no idea how to start with that matchstr :rofl: