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:
Dhruva Sagar
2017-01-04 15:45:48 +05:30
parent 441c30c35a
commit 9edd6d7d20
5 changed files with 15 additions and 9 deletions

View File

@@ -44,18 +44,14 @@ call s:SetGlobalOptDefault('table_mode_eval_formula_map', '<Leader>tfe')
call s:SetGlobalOptDefault('table_mode_echo_cell_map', '<Leader>t?')
call s:SetGlobalOptDefault('table_mode_sort_map', '<Leader>ts')
call s:SetGlobalOptDefault('table_mode_syntax', 1)
function! s:TableEchoCell() "{{{1
if tablemode#table#IsRow('.')
echomsg '$' . tablemode#spreadsheet#RowNr('.') . ',' . tablemode#spreadsheet#ColumnNr('.')
endif
endfunction
augroup TableMode
au!
autocmd Syntax * if tablemode#IsActive() | call tablemode#SyntaxEnable() | endif
augroup END
" Define Commands & Mappings {{{1
if !g:table_mode_always_active "{{{2
exec "nnoremap <silent>" g:table_mode_map_prefix . g:table_mode_toggle_map ":<C-U>call tablemode#Toggle()<CR>"