Rename to g:neosnippet#enable_completed_snippet

This commit is contained in:
Shougo Matsushita 2015-12-26 11:42:46 +09:00
parent 4583b46376
commit 0bc303430b
4 changed files with 9 additions and 5 deletions

View File

@ -42,7 +42,8 @@ call neosnippet#util#set_default(
call neosnippet#util#set_default(
\ 'g:neosnippet#enable_conceal_markers', 1)
call neosnippet#util#set_default(
\ 'g:neosnippet#enable_complete_done', 0)
\ 'g:neosnippet#enable_completed_snippet', 0,
\ 'g:neosnippet#enable_complete_done')
call neosnippet#util#set_default(
\ 'g:neosnippet#enable_auto_clear_markers', 1)
"}}}

View File

@ -28,7 +28,7 @@ set cpo&vim
function! neosnippet#handlers#_complete_done() "{{{
if empty(v:completed_item)
\ || !g:neosnippet#enable_complete_done
\ || !g:neosnippet#enable_completed_snippet
\ || v:completed_item.word !~ '($'
return
endif

View File

@ -91,7 +91,10 @@ function! neosnippet#util#expand(path) "{{{
\ expand(escape(a:path, '*?[]"={}'), 1))
endfunction"}}}
function! neosnippet#util#set_default(var, val, ...) "{{{
if !exists(a:var)
let old_var = get(a:000, 0, '')
if exists(old_var)
let {a:var} = {old_var}
elseif !exists(a:var)
let {a:var} = a:val
endif
endfunction"}}}

View File

@ -228,8 +228,8 @@ g:neosnippet#enable_conceal_markers
The default value is 1.
*g:neosnippet#enable_complete_done*
g:neosnippet#enable_complete_done
*g:neosnippet#enable_completed_snippet*
g:neosnippet#enable_completed_snippet
If this variable is not 0, neosnippet will expand the function
prototype when |CompleteDone| autocmd.