Fixed quotes, for re-do.

This commit is contained in:
Israel Chauca Fuentes
2010-05-03 03:35:58 -05:00
parent b25906e610
commit b9bd9e3229
2 changed files with 5 additions and 2 deletions

View File

@@ -243,16 +243,19 @@ function! delimitMate#QuoteDelim(char) "{{{
return a:char return a:char
elseif line[col + 1] == a:char elseif line[col + 1] == a:char
" Get out of the string. " 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 == "'") || elseif (line[col] =~ '[a-zA-Z0-9]' && a:char == "'") ||
\(line[col] =~ '[a-zA-Z0-9]' && b:delimitMate_smart_quotes) \(line[col] =~ '[a-zA-Z0-9]' && b:delimitMate_smart_quotes)
" Seems like an apostrophe or a closing, insert a single quote. " Seems like an apostrophe or a closing, insert a single quote.
return a:char return a:char
elseif (line[col] == a:char && line[col + 1 ] != a:char) && b:delimitMate_smart_quotes 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. " 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) return delimitMate#WriteAfter(a:char)
else else
" Insert a pair and jump to the middle. " Insert a pair and jump to the middle.
call insert(b:delimitMate_buffer, a:char)
call delimitMate#WriteAfter(a:char) call delimitMate#WriteAfter(a:char)
return a:char return a:char
endif endif

View File

@@ -25,7 +25,7 @@ if v:version < 700
endif endif
let s:loaded_delimitMate = 1 " }}} let s:loaded_delimitMate = 1 " }}}
let delimitMate_version = '2.0' let delimitMate_version = '2.1_DEV'
function! s:Init() "{{{ function! s:Init() "{{{