Skip to content

Commit

Permalink
Merge pull request #233 from kyoh86/disable-mappings
Browse files Browse the repository at this point in the history
Support new option "disable_mappings"
  • Loading branch information
dhruvasagar authored Mar 13, 2024
2 parents 4ff8de2 + 76b72a5 commit 319e353
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions doc/table-mode.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 = '+'
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 319e353

Please sign in to comment.