Fix for ${0} problems

This commit is contained in:
Shougo Matsushita
2015-12-19 11:44:33 +09:00
parent 248ee0651f
commit 1d5b8589b6
3 changed files with 6 additions and 8 deletions

View File

@@ -74,11 +74,12 @@ function! neosnippet#handlers#_complete_done() "{{{
if !s:is_auto_pairs()
if key != '(' && snippet =~ key.'$'
let snippet .= '${'. cnt .'}'.pair
let cnt += 1
elseif snippet !~ pair.'$'
let snippet .= pair
endif
let snippet .= '${0}'
let snippet .= '${' . cnt . '}'
endif
let [cur_text, col, _] = neosnippet#mappings#_pre_trigger()

View File

@@ -238,11 +238,6 @@ endfunction"}}}
function! neosnippet#parser#_initialize_snippet(dict, path, line, pattern, name) "{{{
let a:dict.word = substitute(a:dict.word, '\n\+$', '', '')
if a:dict.word !~
\ neosnippet#get_placeholder_marker_substitute_pattern()
" Add placeholder.
let a:dict.word .= '${0}'
endif
if !has_key(a:dict, 'abbr') || a:dict.abbr == ''
" Set default abbr.