From 7caa6092b7f15aa80c3d4576f59a6a2dd8bd3424 Mon Sep 17 00:00:00 2001 From: Israel Chauca Fuentes Date: Thu, 27 Jun 2013 21:35:37 -0400 Subject: [PATCH] Fix mapping. Close #132. --- autoload/delimitMate.vim | 8 +++----- plugin/delimitMate.vim | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/autoload/delimitMate.vim b/autoload/delimitMate.vim index a282862..b9c8492 100644 --- a/autoload/delimitMate.vim +++ b/autoload/delimitMate.vim @@ -434,24 +434,22 @@ function! delimitMate#JumpOut(char) "{{{ endif endfunction " }}} -function! delimitMate#JumpAny(key) " {{{ +function! delimitMate#JumpAny(...) " {{{ if delimitMate#IsForbidden('') - return a:key + return '' endif if !delimitMate#ShouldJump() - return a:key + return '' endif " Let's get the character on the right. let char = delimitMate#GetCharFromCursor(0) if char == " " " Space expansion. - "let char = char . getline('.')[col('.')] . delimitMate#Del() return char . getline('.')[col('.')] . delimitMate#Del() . \ delimitMate#Del() "call delimitMate#RmBuffer(1) elseif char == "" " CR expansion. - "let char = "\" . getline(line('.') + 1)[0] . "\" call delimitMate#FlushBuffer() return "\" . getline(line('.') + 1)[0] . delimitMate#Del() . "\" else diff --git a/plugin/delimitMate.vim b/plugin/delimitMate.vim index 9616869..0534e37 100644 --- a/plugin/delimitMate.vim +++ b/plugin/delimitMate.vim @@ -347,7 +347,7 @@ function! s:ExtraMappings() "{{{ silent! imap delimitMateSpace endif " Jump over any delimiter: - inoremap delimitMateS-Tab =delimitMate#JumpAny("\") + inoremap delimitMateS-Tab =delimitMate#JumpAny() if s:g('tab2exit') && !hasmapto('delimitMateS-Tab', 'i') && maparg('', 'i') == '' silent! imap delimitMateS-Tab endif