- Improved neosnippet initialization.

This commit is contained in:
Shougo Matsushita 2013-05-21 14:24:20 +09:00
parent 58698b6959
commit d402391f08
3 changed files with 10 additions and 19 deletions

View File

@ -1,7 +1,7 @@
"============================================================================= "=============================================================================
" FILE: neosnippet.vim " FILE: neosnippet.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com> " AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" Last Modified: 16 Apr 2013. " Last Modified: 21 May 2013.
" License: MIT license {{{ " License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining " Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the " a copy of this software and associated documentation files (the
@ -47,21 +47,10 @@ let s:neosnippet_options = [
\] \]
"}}} "}}}
function! neosnippet#_lazy_initialize() "{{{ function! neosnippet#initialize() "{{{
if !exists('s:lazy_progress') call s:initialize_script_variables()
let s:lazy_progress = 0 call s:initialize_others()
endif call s:initialize_cache()
if s:lazy_progress == 0
elseif s:lazy_progress == 1
call s:initialize_script_variables()
elseif s:lazy_progress == 2
call s:initialize_others()
else
call s:initialize_cache()
endif
let s:lazy_progress += 1
endfunction"}}} endfunction"}}}
function! s:check_initialize() "{{{ function! s:check_initialize() "{{{

View File

@ -784,6 +784,9 @@ A: You can use |:NeoSnippetSource| for it.
============================================================================== ==============================================================================
CHANGELOG *neosnippet-changelog* CHANGELOG *neosnippet-changelog*
2013-05-21
- Improved neosnippet initialization.
2013-05-18 2013-05-18
- Added go snippets. - Added go snippets.

View File

@ -1,7 +1,7 @@
"============================================================================= "=============================================================================
" FILE: neosnippet.vim " FILE: neosnippet.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com> " AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" Last Modified: 20 Jan 2013. " Last Modified: 21 May 2013.
" License: MIT license {{{ " License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining " Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the " a copy of this software and associated documentation files (the
@ -89,8 +89,7 @@ inoremap <expr><silent> <Plug>(neosnippet_start_unite_snippet)
"}}} "}}}
augroup neosnippet "{{{ augroup neosnippet "{{{
autocmd CursorHold,CursorMovedI autocmd InsertEnter * call neosnippet#initialize()
\ * call neosnippet#_lazy_initialize()
augroup END"}}} augroup END"}}}
" Commands. "{{{ " Commands. "{{{