Added option to disable all mappings

This commit is contained in:
Alex Rodionov
2014-07-23 08:59:28 +07:00
parent 4c91a4efa2
commit 135d571e9c
2 changed files with 37 additions and 32 deletions

View File

@@ -53,6 +53,7 @@ function! s:ToggleMapping() "{{{2
" '|' is a special character, we need to map <Bar> instead
if g:table_mode_separator ==# '|' | let separator_map = '<Bar>' | endif
if !exists('g:table_mode_disable_mappings')
if tablemode#IsActive()
call s:Map('<Plug>(table-mode-tableize)', separator_map, 'i')
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>t?', 'n')
endif
endif
endfunction
function! tablemode#SyntaxEnable()

View File

@@ -213,6 +213,9 @@ g:table_mode_align_char *table-mode-align-char*
alignments for columns in the table header border. >
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*