mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-08 11:03:47 -05:00
Merge pull request #35 from p0deje/master
Added option to disable all mappings. Fixes #34
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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*
|
||||
|
||||
@@ -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('.')
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user