- Improved neosnippet initialization.
This commit is contained in:
parent
58698b6959
commit
d402391f08
@ -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')
|
|
||||||
let s:lazy_progress = 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
if s:lazy_progress == 0
|
|
||||||
elseif s:lazy_progress == 1
|
|
||||||
call s:initialize_script_variables()
|
call s:initialize_script_variables()
|
||||||
elseif s:lazy_progress == 2
|
|
||||||
call s:initialize_others()
|
call s:initialize_others()
|
||||||
else
|
|
||||||
call s:initialize_cache()
|
call s:initialize_cache()
|
||||||
endif
|
|
||||||
|
|
||||||
let s:lazy_progress += 1
|
|
||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
|
|
||||||
function! s:check_initialize() "{{{
|
function! s:check_initialize() "{{{
|
||||||
|
@ -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.
|
||||||
|
|
||||||
|
@ -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. "{{{
|
||||||
|
Loading…
Reference in New Issue
Block a user