mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-06 12:44:27 +08:00
Fixed quotes, for re-do.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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() "{{{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user