mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-08 19:13:46 -05:00
Added option to disable all mappings
This commit is contained in:
@@ -53,6 +53,7 @@ function! s:ToggleMapping() "{{{2
|
|||||||
" '|' is a special character, we need to map <Bar> instead
|
" '|' is a special character, we need to map <Bar> instead
|
||||||
if g:table_mode_separator ==# '|' | let separator_map = '<Bar>' | endif
|
if g:table_mode_separator ==# '|' | let separator_map = '<Bar>' | endif
|
||||||
|
|
||||||
|
if !exists('g:table_mode_disable_mappings')
|
||||||
if tablemode#IsActive()
|
if tablemode#IsActive()
|
||||||
call s:Map('<Plug>(table-mode-tableize)', separator_map, 'i')
|
call s:Map('<Plug>(table-mode-tableize)', separator_map, 'i')
|
||||||
call s:Map('<Plug>(table-mode-motion-up)', '{<Bar>', 'n')
|
call s:Map('<Plug>(table-mode-motion-up)', '{<Bar>', 'n')
|
||||||
@@ -83,6 +84,7 @@ function! s:ToggleMapping() "{{{2
|
|||||||
call s:UnMap('<Leader>tfe', 'n')
|
call s:UnMap('<Leader>tfe', 'n')
|
||||||
call s:UnMap('<Leader>t?', 'n')
|
call s:UnMap('<Leader>t?', 'n')
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! tablemode#SyntaxEnable()
|
function! tablemode#SyntaxEnable()
|
||||||
|
|||||||
@@ -213,6 +213,9 @@ g:table_mode_align_char *table-mode-align-char*
|
|||||||
alignments for columns in the table header border. >
|
alignments for columns in the table header border. >
|
||||||
let g:table_mode_align_char = ':'
|
let g:table_mode_align_char = ':'
|
||||||
<
|
<
|
||||||
|
g:table_mode_disable_mappings table-mode-disable-mappings
|
||||||
|
Set this to true to disable all mappings.
|
||||||
|
let g:table_mode_disable_mappings = 1
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
MAPPINGS *table-mode-mappings*
|
MAPPINGS *table-mode-mappings*
|
||||||
|
|||||||
Reference in New Issue
Block a user