diff --git a/plugin/delimitMate.vim b/plugin/delimitMate.vim index d6296ad..513075f 100644 --- a/plugin/delimitMate.vim +++ b/plugin/delimitMate.vim @@ -261,7 +261,7 @@ function! s:NoAutoClose() "{{{ if delim == '|' let delim = '' endif - exec 'inoremap delimitMate' . delim . ' =delimitMate#SkipDelim("' . escape(delim,'"') . '")' + exec 'inoremap delimitMate' . delim . ' =delimitMate#SkipDelim("' . escape(delim,'"') . '")' exec 'silent! imap '.delim.' delimitMate'.delim endfor endfunction "}}} @@ -274,7 +274,7 @@ function! s:AutoClose() "{{{ let ld = s:g('left_delims')[i] == '|' ? '' : s:g('left_delims')[i] let rd = s:g('right_delims')[i] == '|' ? '' : s:g('right_delims')[i] exec 'inoremap delimitMate' . ld - \. ' delimitMate#ParenDelim("' . escape(rd, '|') . '")' + \. ' "\".delimitMate#ParenDelim("' . escape(rd, '|') . '")' exec 'silent! imap '.ld \.' delimitMate'.ld let i += 1 @@ -283,7 +283,7 @@ function! s:AutoClose() "{{{ " Exit from inside the matching pair: for delim in s:g('right_delims') exec 'inoremap delimitMate' . delim - \. ' delimitMate#JumpOut("\' . delim . '")' + \. ' "\".delimitMate#JumpOut("\' . delim . '")' exec 'silent! imap ' . delim \. ' delimitMate'. delim endfor @@ -294,7 +294,7 @@ function! s:AutoClose() "{{{ if delim == '|' let delim = '' endif - exec 'inoremap delimitMate' . delim . ' =delimitMate#QuoteDelim("\' . delim . '")' + exec 'inoremap delimitMate' . delim . ' =delimitMate#QuoteDelim("\' . delim . '")' exec 'silent! imap ' . delim . ' delimitMate' . delim endfor @@ -323,22 +323,22 @@ function! s:ExtraMappings() "{{{ silent! imap delimitMateS-BS endif " Expand return if inside an empty pair: - inoremap delimitMateCR =delimitMate#ExpandReturn() + inoremap delimitMateCR =delimitMate#ExpandReturn() if s:g('expand_cr') && !hasmapto('delimitMateCR', 'i') && maparg('', 'i') == '' silent! imap delimitMateCR endif " Expand space if inside an empty pair: - inoremap delimitMateSpace =delimitMate#ExpandSpace() + inoremap delimitMateSpace =delimitMate#ExpandSpace() if s:g('expand_space') && !hasmapto('delimitMateSpace', 'i') && maparg('', 'i') == '' 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 " Jump over next delimiters - inoremap delimitMateJumpMany =delimitMate#JumpMany() + inoremap delimitMateJumpMany =delimitMate#JumpMany() if !hasmapto('delimitMateJumpMany', 'i') && maparg("g", 'i') == '' imap g delimitMateJumpMany endif diff --git a/test/autoclose_matchpairs.txt b/test/autoclose_matchpairs.txt index 6d89bc2..809c44f 100644 --- a/test/autoclose_matchpairs.txt +++ b/test/autoclose_matchpairs.txt @@ -35,3 +35,7 @@ let b:delimitMate_eol_marker = ';' %d # BS should behave accordingly. "abc(\" "abc;" +# Expand iabbreviations +unlet b:delimitMate_eol_marker +iabb def ghi +"def(" "ghi()" diff --git a/test/autoclose_quotes.txt b/test/autoclose_quotes.txt index e843ea8..70541e2 100644 --- a/test/autoclose_quotes.txt +++ b/test/autoclose_quotes.txt @@ -48,3 +48,6 @@ let g:delimitMate_nesting_quotes = split(g:delimitMate_quotes, '\s\+') "''x" "''x" "'x" "'x'" unlet g:delimitMate_nesting_quotes +# expand iabbreviations +iabb def ghi +"def'" "ghi'"