diff --git a/autoload/tablemode.vim b/autoload/tablemode.vim index 2dfb841..aa96eea 100644 --- a/autoload/tablemode.vim +++ b/autoload/tablemode.vim @@ -69,10 +69,11 @@ function! s:ToggleSyntax() "{{{2 if !g:table_mode_syntax | return | endif if tablemode#IsActive() + let s:table_mode_syntax_dict = tablemode#utils#get_buffer_or_global_option('table_mode_syntax_dict') execute 'syntax match Table' \ '/' . tablemode#table#StartExpr() . '\zs|.\+|\ze' . tablemode#table#EndExpr() . '/' - \ 'contains=' . g:TableModeSyntaxDict.contains - \ 'containedin=' . g:TableModeSyntaxDict.containedin + \ 'contains=' . s:table_mode_syntax_dict.contains + \ 'containedin=' . s:table_mode_syntax_dict.containedin syntax match TableSeparator /|/ contained syntax match TableColumnAlign /:/ contained syntax match TableBorder /[\-+]\+/ contained diff --git a/plugin/table-mode.vim b/plugin/table-mode.vim index 72409b1..a01c7f9 100644 --- a/plugin/table-mode.vim +++ b/plugin/table-mode.vim @@ -133,7 +133,7 @@ augroup END let &cpo = s:save_cpo " ToggleSyntax {{{1 -let g:TableModeSyntaxDict = { +let g:table_mode_syntax_dict = { \ 'contains': 'TableBorder,TableSeparator,TableColumnAlign,' . \ 'yesCell,noCell,maybeCell,redCell,greenCell,yellowCell,blueCell,whiteCell,darkCell', \ 'containedin': 'ALL'