Skip to content

Commit

Permalink
Support disable all default mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoh86 committed Jan 18, 2024
1 parent 4ff8de2 commit e7695fa
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
35 changes: 24 additions & 11 deletions doc/table-mode.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,21 @@ Formula Expressions :
OPTIONS *table-mode-options*

Overview:
|table-mode-loaded| ............. Disable the plugin.
|table-mode-verbose| ............ Notify when Enabled/Disabled.
|table-mode-corner| ............. Set corner character.
|table-mode-separator| .......... Set separator character.
|table-mode-separator-map| ...... Set separator mapping.
|table-mode-fillchar| ........... Set table border fillchar character.
|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-loaded| ............. Disable the plugin.
|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.
|table-mode-fillchar| ........... Set table border fillchar character.
|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
extreme corners of the table border.
|table-mode-align-char|.......... Set the alignment character which
Expand Down Expand Up @@ -199,6 +203,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 = '+'
Expand Down
4 changes: 3 additions & 1 deletion plugin/table-mode.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 TableModeEnable call tablemode#Enable()
command! -nargs=0 TableModeDisable call tablemode#Disable()
Expand Down

0 comments on commit e7695fa

Please sign in to comment.