From 50d97fd76ec3c51d10c1e657cb79f5bca4eef602 Mon Sep 17 00:00:00 2001 From: Israel Chauca Fuentes Date: Thu, 3 Sep 2015 12:32:25 -0400 Subject: [PATCH] Simplify pattern --- plugin/delimitMate.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/delimitMate.vim b/plugin/delimitMate.vim index 8d64d30..106351a 100644 --- a/plugin/delimitMate.vim +++ b/plugin/delimitMate.vim @@ -111,7 +111,8 @@ function! s:init() "{{{ " smart_quotes " XXX: backward compatibility. Ugly, should go the way of the dodo soon. let quotes = escape(join(s:get('quotes_list'), ''), '\-^[]') - let default_smart_quotes = '\%(\w\|[^[:punct:][:space:]' . quotes . ']\|\%(\\\\\)*\\\)\%#\|\%#\%(\w\|[^[:space:][:punct:]' . quotes . ']\)' + let word_pat = '\w\|[^[:punct:][:space:]' . quotes . ']\|\%(\\\\\)*\\' + let default_smart_quotes = '\%(' . word_pat . '\)\%#\|\%#\%(' . word_pat . '\)' if exists('g:delimitMate_smart_quotes') && type(g:delimitMate_smart_quotes) == type(0) if g:delimitMate_smart_quotes unlet g:delimitMate_smart_quotes