mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-08 11:03:47 -05:00
Add configuration option table_mode_update_time #73
This is for better experience with auto align, we override the updatetime with the value of the configuration g:table_mode_update_time. Once table mode is disabled prior defaults are restored.
This commit is contained in:
@@ -105,11 +105,21 @@ function! s:ToggleAutoAlign() "{{{2
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:ToggleOptions() "{{{2
|
||||
if tablemode#IsActive()
|
||||
let b:old_update_time = &updatetime
|
||||
setl updatetime = g:table_mode_update_time
|
||||
else
|
||||
exec 'set updatetime='.get(b:, 'old_update_time', 4000)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:SetActive(bool) "{{{2
|
||||
let b:table_mode_active = a:bool
|
||||
call s:ToggleSyntax()
|
||||
call s:ToggleMapping()
|
||||
call s:ToggleAutoAlign()
|
||||
call s:ToggleOptions()
|
||||
if tablemode#IsActive()
|
||||
doautocmd User TableModeEnabled
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user