Fix for ${0} problems
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user