diff --git a/autoload/neosnippet.vim b/autoload/neosnippet.vim index 7629d2a..64a49df 100644 --- a/autoload/neosnippet.vim +++ b/autoload/neosnippet.vim @@ -81,19 +81,19 @@ endfunction"}}} " Get marker patterns. function! neosnippet#get_placeholder_target_marker_pattern() abort "{{{ - return '\${\d\+:\(#:\)\?TARGET\%(:.\{-}\)\?\\\@' endfunction"}}} function! neosnippet#get_placeholder_marker_substitute_pattern() abort "{{{ - return '\${\(\d\+\%(:.\{-}\)\?\\\@' diff --git a/autoload/neosnippet/view.vim b/autoload/neosnippet/view.vim index e0ec121..1141d4c 100644 --- a/autoload/neosnippet/view.vim +++ b/autoload/neosnippet/view.vim @@ -58,20 +58,16 @@ function! neosnippet#view#_insert(snippet, options, cur_text, col) abort "{{{ let snip_word = s:eval_snippet(snip_word) endif - " Substitute escaped `. - let snip_word = substitute(snip_word, '\\`', '`', 'g') - " Substitute markers. let snip_word = substitute(snip_word, - \ '\\\@', 'g') let snip_word = substitute(snip_word, - \ '\\\@', 'g') - let snip_word = substitute(snip_word, - \ '\\'.neosnippet#get_mirror_placeholder_marker_substitute_pattern().'\|'. - \ '\\'.neosnippet#get_placeholder_marker_substitute_pattern(), - \ '\=submatch(0)[1:]', 'g') + + " Substitute escaped characters. + let snip_word = substitute(snip_word, '\\\\', '\\', 'g') " Insert snippets. let next_line = getline('.')[a:col-1 :] diff --git a/syntax/neosnippet.vim b/syntax/neosnippet.vim index 8854a5c..166e94b 100644 --- a/syntax/neosnippet.vim +++ b/syntax/neosnippet.vim @@ -42,7 +42,7 @@ syntax match neosnippetWord \ '^\s\+.*$' contains= \neosnippetEval,neosnippetPlaceHolder,neosnippetEscape,neosnippetVariable syntax match neosnippetPlaceHolder - \ '\\\@