mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-12 04:53:46 -05:00
Add config to disable table mode syntax
Since table mode syntax can hamper performance, it is now possible to disable it with a global config
This commit is contained in:
@@ -65,7 +65,7 @@ function! s:ToggleMapping() "{{{2
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! tablemode#SyntaxEnable()
|
||||
function! tablemode#SyntaxEnable() "{{{2
|
||||
exec 'syntax match Table'
|
||||
\ '/' . tablemode#table#StartExpr() . '\zs|.\+|\ze' . tablemode#table#EndExpr() . '/'
|
||||
\ 'contains=TableBorder,TableSeparator,TableColumnAlign containedin=ALL'
|
||||
@@ -79,6 +79,8 @@ function! tablemode#SyntaxEnable()
|
||||
endfunction
|
||||
|
||||
function! s:ToggleSyntax()
|
||||
if !g:table_mode_syntax | return | endif
|
||||
|
||||
if tablemode#IsActive()
|
||||
call tablemode#SyntaxEnable()
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user