Improve auto placeholder feature
This commit is contained in:
@@ -238,6 +238,14 @@ endfunction"}}}
|
||||
|
||||
function! neosnippet#parser#_initialize_snippet(dict, path, line, pattern, name) "{{{
|
||||
let a:dict.word = substitute(a:dict.word, '\n\+$', '', '')
|
||||
if a:dict.word !~ '\n'
|
||||
\ && a:dict.word !~
|
||||
\ neosnippet#get_placeholder_marker_substitute_pattern().'$'
|
||||
\ && a:dict.word !~
|
||||
\ neosnippet#get_placeholder_marker_substitute_zero_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