Prevent imap of <CR> if already mapped

This commit is contained in:
Christian Rondeau 2016-12-05 18:17:38 -05:00
parent 0966031234
commit 3b96f8ffeb

View File

@ -564,13 +564,14 @@ function! s:CR(normal, just_mrkr) "{{{
call vimwiki#lst#kbd_cr(a:normal, a:just_mrkr) call vimwiki#lst#kbd_cr(a:normal, a:just_mrkr)
endfunction "}}} endfunction "}}}
if maparg('<CR>', 'i') !~? '<Esc>:VimwikiReturn' if !hasmapto('VimwikiReturn', 'i')
inoremap <silent><buffer> <CR> <Esc>:VimwikiReturn 1 5<CR> if maparg('<CR>', 'i') !~? '<Esc>:VimwikiReturn'
inoremap <silent><buffer> <CR> <Esc>:VimwikiReturn 1 5<CR>
endif
if maparg('<S-CR>', 'i') !~? '<Esc>:VimwikiReturn'
inoremap <silent><buffer> <S-CR> <Esc>:VimwikiReturn 2 2<CR>
endif
endif endif
if maparg('<S-CR>', 'i') !~? '<Esc>:VimwikiReturn'
inoremap <silent><buffer> <S-CR> <Esc>:VimwikiReturn 2 2<CR>
endif
"Table mappings "Table mappings
if g:vimwiki_table_mappings if g:vimwiki_table_mappings