From 7324d6a2d954f685dea784a9a486a991ae3fa2e9 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 20 Dec 2014 12:12:58 +0100 Subject: [PATCH] Improved errors appearance --- plugin/eregex.vim | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugin/eregex.vim b/plugin/eregex.vim index 4eae55b..84c37ec 100644 --- a/plugin/eregex.vim +++ b/plugin/eregex.vim @@ -723,7 +723,7 @@ function! s:Ematch(...) if delim !=# '/' && delim !=# '?' let v:errmsg= "The delimiter `" . delim . "' isn't available, use `/' ." - echo v:errmsg + echohl WarningMsg | echo v:errmsg return endif @@ -769,8 +769,7 @@ function! s:Ematch(...) if v:errmsg ==# '' redraw! else - echo 'M' . string - echo v:errmsg + echohl WarningMsg | echo v:errmsg endif if delim == '?' @@ -793,7 +792,7 @@ function! s:Esubstitute(...) range let rxp=substitute(rxp, 'delim', delim, "g") if string !~# rxp if s:eglobal_working==0 - echo 'Invalid arguments S' . a:1 + echohl WarningMsg | echo 'Invalid arguments S' . a:1 endif return endif @@ -851,10 +850,10 @@ function! s:Esubstitute(...) range if confirmoption==0 if v:errmsg==# '' if v:statusmsg !=# '' - echo v:statusmsg + echohl WarningMsg | echo v:statusmsg endif else - echo v:errmsg + echohl WarningMsg | echo v:errmsg endif endif endif @@ -967,7 +966,7 @@ function! s:GetDelim(str) return delim endif let v:errmsg = "The delimiter `" . delim . "' isn't available, use " . valid - echo v:errmsg + echohl WarningMsg | echo v:errmsg return '' endfunction "end s:GetDelim()