From b6f4c547164200e511f10b203a8ac259a16df479 Mon Sep 17 00:00:00 2001 From: Dave Marshall Date: Tue, 16 Oct 2012 16:04:04 +0200 Subject: [PATCH] Allow backslashes in placeholder defaults I managed to put a backslash in a placeholder default, by escaping it like \\, and then changing this pattern. I've no idea how safe it is, the placeholder in a placeholders still seem to work, but I don't know if it will have messed anything else up. --- autoload/neocomplcache/sources/snippets_complete.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/neocomplcache/sources/snippets_complete.vim b/autoload/neocomplcache/sources/snippets_complete.vim index 280ae1c..fd97598 100644 --- a/autoload/neocomplcache/sources/snippets_complete.vim +++ b/autoload/neocomplcache/sources/snippets_complete.vim @@ -769,7 +769,7 @@ function! s:expand_placeholder(start, end, holder_cnt, line)"{{{ \ s:get_placeholder_marker_default_pattern(), \ '\\d\\+', a:holder_cnt, '') let default = substitute( - \ matchstr(current_line, default_pattern), '\\\ze.', '', 'g') + \ matchstr(current_line, default_pattern), '\\\ze[^\\]', '', 'g') " Substitute marker. let default = substitute(default, \ s:get_placeholder_marker_substitute_pattern(),