Merge pull request #233 from kyoh86/disable-mappings

Support new option "disable_mappings"
This commit is contained in:
Dhruva Sagar
2024-03-13 20:30:30 +05:30
committed by GitHub
2 changed files with 15 additions and 1 deletions

View File

@@ -147,6 +147,9 @@ OPTIONS *table-mode-options*
Overview:
|table-mode-loaded| ............. Disable the plugin.
|table-mode-verbose| ............ Notify when Enabled/Disabled.
|table-mode-disable-mappings| ... Disable default mappings.
|table-mode-disable-tableize-mappings|
Disable tableize mappings.
|table-mode-corner| ............. Set corner character.
|table-mode-separator| .......... Set separator character.
|table-mode-separator-map| ...... Set separator mapping.
@@ -199,6 +202,15 @@ g:table_mode_verbose *table-mode-verbose*
Use this option to disable notifications: >
let g:table_mode_verbose = 0
<
g:table_mode_disable_mappings *table-mode-disable-mappings*
Use this option to disable default mappings: >
let g:table_mode_disable_mappings = 1
<
*table-mode-disable-tableize-mappings*
g:table_mode_disable_tableize_mappings
Use this option to disable tableize mappings: >
let g:table_mode_disable_tableize_mappings = 1
<
g:table_mode_corner *table-mode-corner*
Use this option to define the table corner character: >
let g:table_mode_corner = '+'

View File

@@ -64,7 +64,9 @@ call s:SetGlobalOptDefault('table_mode_tableize_auto_border', 0)
call s:SetGlobalOptDefault('table_mode_ignore_align', 0)
if !g:table_mode_always_active "{{{2
if !g:table_mode_disable_mappings
exec "nnoremap <silent>" g:table_mode_map_prefix . g:table_mode_toggle_map ":<C-U>call tablemode#Toggle()<CR>"
endif
command! -nargs=0 TableModeToggle call tablemode#Toggle()
command! -nargs=0 TableModeEnable call tablemode#Enable()
command! -nargs=0 TableModeDisable call tablemode#Disable()