Merge pull request #35 from p0deje/master

Added option to disable all mappings. Fixes #34
This commit is contained in:
Dhruva Sagar
2014-07-25 07:27:53 +05:30
4 changed files with 39 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 !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*

View File

@@ -43,6 +43,7 @@ call s:SetGlobalOptDefault('table_mode_always_active', 0)
call s:SetGlobalOptDefault('table_mode_delimiter', ',')
call s:SetGlobalOptDefault('table_mode_corner_corner', '|')
call s:SetGlobalOptDefault('table_mode_align_char', ':')
call s:SetGlobalOptDefault('table_mode_disable_mappings', 0)
function! s:TableEchoCell() "{{{1
if tablemode#table#IsRow('.')

View File

@@ -7,3 +7,4 @@ let g:table_mode_always_active = 0
let g:table_mode_delimiter = ','
let g:table_mode_corner_corner = '|'
let g:table_mode_align_char = ':'
let g:table_mode_disable_mappings = 0