diff --git a/autoload/delimitMate.vim b/autoload/delimitMate.vim index 9e32c55..0da08da 100644 --- a/autoload/delimitMate.vim +++ b/autoload/delimitMate.vim @@ -243,16 +243,19 @@ function! delimitMate#QuoteDelim(char) "{{{ return a:char elseif line[col + 1] == a:char " Get out of the string. - return delimitMate#WriteBefore(a:char) + "return delimitMate#WriteBefore(a:char) + return a:char . delimitMate#Del() elseif (line[col] =~ '[a-zA-Z0-9]' && a:char == "'") || \(line[col] =~ '[a-zA-Z0-9]' && b:delimitMate_smart_quotes) " Seems like an apostrophe or a closing, insert a single quote. return a:char elseif (line[col] == a:char && line[col + 1 ] != a:char) && b:delimitMate_smart_quotes " Seems like we have an unbalanced quote, insert one quotation mark and jump to the middle. + call insert(b:delimitMate_buffer, a:char) return delimitMate#WriteAfter(a:char) else " Insert a pair and jump to the middle. + call insert(b:delimitMate_buffer, a:char) call delimitMate#WriteAfter(a:char) return a:char endif diff --git a/plugin/delimitMate.vim b/plugin/delimitMate.vim index d1675d4..6c4243d 100644 --- a/plugin/delimitMate.vim +++ b/plugin/delimitMate.vim @@ -25,7 +25,7 @@ if v:version < 700 endif let s:loaded_delimitMate = 1 " }}} -let delimitMate_version = '2.0' +let delimitMate_version = '2.1_DEV' function! s:Init() "{{{