From 2ba694830d8241caccbce24a1b5ea51e13d63d11 Mon Sep 17 00:00:00 2001 From: Israel Chauca Fuentes Date: Sat, 6 Nov 2010 22:35:40 -0500 Subject: [PATCH] Use '\w' instead of '[[:alnum:]]' in smart_quotes. --- autoload/delimitMate.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/delimitMate.vim b/autoload/delimitMate.vim index 6f537a0..4cb5e04 100644 --- a/autoload/delimitMate.vim +++ b/autoload/delimitMate.vim @@ -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