Skip to content

Commit

Permalink
Use '\w' instead of '[[:alnum:]]' in smart_quotes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raimondi committed Nov 7, 2010
1 parent 12c5c96 commit 2ba6948
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions autoload/delimitMate.vim
Expand Up @@ -285,10 +285,10 @@ function! delimitMate#QuoteDelim(char) "{{{
\ index(b:_l_delimitMate_nesting_quotes, a:char) < 0
" Get out of the string.
return a:char . delimitMate#Del()
elseif (line[col] =~ '[[:alnum:]]' && a:char == "'") ||
elseif (line[col] =~ '\w' && a:char == "'") ||
\ (b:_l_delimitMate_smart_quotes &&
\ (line[col] =~ '[[:alnum:]]' ||
\ line[col + 1] =~ '[[:alnum:]]'))
\ (line[col] =~ '\w' ||
\ line[col + 1] =~ '\w'))
" Seems like an apostrophe or a smart quote case, insert a single quote.
return a:char
elseif (line[col] == a:char && line[col + 1 ] != a:char) && b:_l_delimitMate_smart_quotes
Expand Down

0 comments on commit 2ba6948

Please sign in to comment.