Support disable all default mappings

This commit is contained in:
kyoh86
2024-01-18 15:25:38 +09:00
parent 4ff8de2ac9
commit e7695fad5c
2 changed files with 27 additions and 12 deletions

View File

@@ -145,17 +145,21 @@ Formula Expressions :
OPTIONS *table-mode-options* OPTIONS *table-mode-options*
Overview: Overview:
|table-mode-loaded| ............. Disable the plugin. |table-mode-loaded| ............. Disable the plugin.
|table-mode-verbose| ............ Notify when Enabled/Disabled. |table-mode-loaded| ............. Disable the plugin.
|table-mode-corner| ............. Set corner character. |table-mode-verbose| ............ Notify when Enabled/Disabled.
|table-mode-separator| .......... Set separator character. |table-mode-disable-mappings| ... Disable default mappings.
|table-mode-separator-map| ...... Set separator mapping. |table-mode-disable-tableize-mappings|
|table-mode-fillchar| ........... Set table border fillchar character. Disable tableize mappings.
|table-mode-header-fillchar| .... Set table header border fillchar character. |table-mode-corner| ............. Set corner character.
|table-mode-map-prefix| ......... Set prefix for table mode commands. |table-mode-separator| .......... Set separator character.
|table-mode-toggle-map| ......... Set table mode toggle mapping. |table-mode-separator-map| ...... Set separator mapping.
|table-mode-always-active| ...... Set table mode to always enabled. |table-mode-fillchar| ........... Set table border fillchar character.
|table-mode-delimiter| .......... Set the delimiter for Tableize. |table-mode-header-fillchar| .... Set table header border fillchar character.
|table-mode-map-prefix| ......... Set prefix for table mode commands.
|table-mode-toggle-map| ......... Set table mode toggle mapping.
|table-mode-always-active| ...... Set table mode to always enabled.
|table-mode-delimiter| .......... Set the delimiter for Tableize.
|table-mode-corner-corner| ...... Set the character to be used for |table-mode-corner-corner| ...... Set the character to be used for
extreme corners of the table border. extreme corners of the table border.
|table-mode-align-char|.......... Set the alignment character which |table-mode-align-char|.......... Set the alignment character which
@@ -199,6 +203,15 @@ g:table_mode_verbose *table-mode-verbose*
Use this option to disable notifications: > Use this option to disable notifications: >
let g:table_mode_verbose = 0 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* g:table_mode_corner *table-mode-corner*
Use this option to define the table corner character: > Use this option to define the table corner character: >
let g:table_mode_corner = '+' 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) call s:SetGlobalOptDefault('table_mode_ignore_align', 0)
if !g:table_mode_always_active "{{{2 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>" 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 TableModeToggle call tablemode#Toggle()
command! -nargs=0 TableModeEnable call tablemode#Enable() command! -nargs=0 TableModeEnable call tablemode#Enable()
command! -nargs=0 TableModeDisable call tablemode#Disable() command! -nargs=0 TableModeDisable call tablemode#Disable()