mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-02-26 19:47:25 +08:00
Simplify pattern
This commit is contained in:
@@ -111,7 +111,8 @@ function! s:init() "{{{
|
|||||||
" smart_quotes
|
" smart_quotes
|
||||||
" XXX: backward compatibility. Ugly, should go the way of the dodo soon.
|
" XXX: backward compatibility. Ugly, should go the way of the dodo soon.
|
||||||
let quotes = escape(join(s:get('quotes_list'), ''), '\-^[]')
|
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 exists('g:delimitMate_smart_quotes') && type(g:delimitMate_smart_quotes) == type(0)
|
||||||
if g:delimitMate_smart_quotes
|
if g:delimitMate_smart_quotes
|
||||||
unlet g:delimitMate_smart_quotes
|
unlet g:delimitMate_smart_quotes
|
||||||
|
|||||||
Reference in New Issue
Block a user