From b5df733e54a74756af8346e9d594137df4061281 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Thu, 22 Feb 2018 09:46:33 +0800 Subject: [PATCH] Fix highlight --- autoload/SpaceVim/plugins/flygrep.vim | 1 + syntax/SpaceVimFlyGrep.vim | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/SpaceVim/plugins/flygrep.vim b/autoload/SpaceVim/plugins/flygrep.vim index 1164547e0..ed244fc56 100644 --- a/autoload/SpaceVim/plugins/flygrep.vim +++ b/autoload/SpaceVim/plugins/flygrep.vim @@ -152,6 +152,7 @@ function! s:start_replace() abort if !empty(replace_text) call SpaceVim#plugins#iedit#start({'expr' : replace_text}, line('w0'), line('w$')) endif + let s:hi_id = matchadd('FlyGrepPattern', '\c' . join(split(replace_text), '\|'), 1) redrawstatus endfunction " }}} diff --git a/syntax/SpaceVimFlyGrep.vim b/syntax/SpaceVimFlyGrep.vim index 1a602c8a0..5cb7fe5e6 100644 --- a/syntax/SpaceVimFlyGrep.vim +++ b/syntax/SpaceVimFlyGrep.vim @@ -4,5 +4,5 @@ endif let b:current_syntax = "SpaceVimFlyGrep" syntax case ignore +syn match FileName /[^:]*:\d\+:\d\+:/ hi def link FileName Comment -call matchadd('FileName', '[^:]*:\d\+:\d\+:', 2)