diff --git a/autoload/neosnippet/mappings.vim b/autoload/neosnippet/mappings.vim index fe55486..9d00d74 100644 --- a/autoload/neosnippet/mappings.vim +++ b/autoload/neosnippet/mappings.vim @@ -119,8 +119,14 @@ function! neosnippet#mappings#_expand_target_trigger(trigger) "{{{ call cursor(line, col) - call neosnippet#view#_expand( - \ neosnippet#util#get_cur_text(). ' ', col, a:trigger) + if col == 1 + let cur_text = a:trigger + else + let cur_text = neosnippet#util#get_cur_text() + let cur_text = cur_text[: col-2] . a:trigger . cur_text[col :] + endif + + call neosnippet#view#_expand(cur_text, col, a:trigger) endfunction"}}} function! s:snippets_expand(cur_text, col) "{{{