From e5dc853ee3a28191de5a23925c71adb6a723132d Mon Sep 17 00:00:00 2001 From: Jonas DOREL Date: Tue, 5 Oct 2021 17:29:47 +0200 Subject: [PATCH] fix(highlight): disable highlight when word before --- autoload/tablemode.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/autoload/tablemode.vim b/autoload/tablemode.vim index cb430e8..b9b26df 100644 --- a/autoload/tablemode.vim +++ b/autoload/tablemode.vim @@ -82,9 +82,10 @@ function! s:ToggleSyntax() "{{{2 hi! link TableColumnAlign Type if exists("g:table_mode_color_cells") && g:table_mode_color_cells - syntax match yesCell '[^|]*yes[^|]*' - syntax match noCell ' *no[^|]*' - syntax match maybeCell ' *?[^|]*' + syntax match yesCell '|\@<= *yes[^|]*' contained + syntax match noCell '|\@<= *no[^|]*' contained + syntax match maybeCell '|\@<= *?[^|]*' contained + " '|\@<=' : Match previous characters, excluding them from the group endif else