- Fixed error.

This commit is contained in:
Shougo Matsushita 2012-09-30 18:04:48 +09:00
parent 0739b9b12e
commit ba03d23a91
3 changed files with 54 additions and 22 deletions

View File

@ -55,7 +55,7 @@ function! s:source.get_keyword_list(cur_keyword_str)"{{{
for filetype in neocomplcache#get_source_filetypes( for filetype in neocomplcache#get_source_filetypes(
\ neosnippet#get_filetype()) \ neosnippet#get_filetype())
if !has_key(s:snippets, filetype) if !has_key(all_snippets, filetype)
" Caching snippets. " Caching snippets.
call neosnippet#caching_snippets(filetype) call neosnippet#caching_snippets(filetype)
endif endif

View File

@ -90,7 +90,7 @@ COMMANDS *neosnippet-commands*
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
VARIABLES *neosnippet-variables* VARIABLES *neosnippet-variables*
g:neocomplcache_snippets_dir *g:neocomplcache_snippets_dir* g:neosnippet#snippets_directory *g:neosnippet#snippets_directory*
This variable appoints a path to user-defined snippet files. This variable appoints a path to user-defined snippet files.
You can set multiple values in comma-separated form. You can set multiple values in comma-separated form.
If the directory doesn't exist, it is ignored. If the directory doesn't exist, it is ignored.
@ -98,52 +98,79 @@ g:neocomplcache_snippets_dir *g:neocomplcache_snippets_dir*
User defined snippets were read after normal snippet files, User defined snippets were read after normal snippet files,
so redundant snippets will be overwritten. so redundant snippets will be overwritten.
*g:neocomplcache_snippets_dir*
Note: |g:neocomplcache_snippets_dir| is obsolute name.
This variable doesn't exist unless you declare it. This variable doesn't exist unless you declare it.
g:neocomplcache_disable_select_mode_mappings g:neosnippet#disable_select_mode_mappings
*g:neocomplcache_disable_select_mode_mappings* *g:neosnippet#disable_select_mode_mappings*
This variable controls whether to disable Key-mappings in This variable controls whether to disable Key-mappings in
|Select-mode| when snippets_complete performs. Usually you |Select-mode| when snippets_complete performs. Usually you
had better enable it. had better enable it.
*g:neocomplcache_disable_select_mode_mappings*
Note: |g:neocomplcache_disable_select_mode_mappings| is
obsolute name.
Default value is 1. Default value is 1.
g:neocomplcache_snippets_disable_runtime_snippets g:neosnippet#disable_runtime_snippets
*g:neocomplcache_snippets_disable_runtime_snippets* *g:neosnippet#disable_runtime_snippets*
If this variable is 1, runtime snippets won't be loaded. If this variable is 1, runtime snippets won't be loaded.
This variable is useful to avoid snippets conflictions. This variable is useful to avoid snippets conflictions.
*g:neocomplcache_snippets_disable_runtime_snippets*
Note: |g:neocomplcache_snippets_disable_runtime_snippets| is
obsolute name.
Default value is 0. Default value is 0.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
KEY MAPPINGS *neosnippet-key-mappings* KEY MAPPINGS *neosnippet-key-mappings*
<Plug>(neocomplcache_snippets_expand) <Plug>(neosnippet_expand_or_jump)
*<Plug>(neocomplcache_snippets_expand)* *<Plug>(neosnippet_expand_or_jump)*
Expands a cursor snippet of plural lines. When there is no Expands a cursor snippet of plural lines. When there is no
snippet, jumps to the next placeholder. snippet, jumps to the next placeholder.
Note: It searches cursor snippet from keyword patterns in the *<Plug>(neocomplcache_snippets_expand)*
first. Note: |<Plug>(neocomplcache_snippets_expand)| is obsolute
name.
<Plug>(neocomplcache_snippets_jump) <Plug>(neosnippet_jump_or_expand)
*<Plug>(neocomplcache_snippets_jump)* *<Plug>(neosnippet_jump_or_expand)*
Jump to next placeholder. If there is no placeholder, expand a Jump to next placeholder. If there is no placeholder, expand a
multiline cursor snippet. multiline cursor snippet.
<Plug>(neocomplcache_snippets_force_expand) *<Plug>(neocomplcache_snippets_jump)*
Note: |<Plug>(neocomplcache_snippets_jump)| is obsolute
name.
<Plug>(neosnippet_expand)
*<Plug>(neocomplcache_snippets_force_expand)* *<Plug>(neocomplcache_snippets_force_expand)*
Expand a cursor snippet. Does nothing if there is no snippet. Expand a cursor snippet. Does nothing if there is no snippet.
<Plug>(neocomplcache_snippets_force_jump) *<Plug>(neocomplcache_snippets_force_expand)*
*<Plug>(neocomplcache_snippets_force_jump)* Note: |<Plug>(neocomplcache_snippets_force_expand)| is
obsolute name.
<Plug>(neosnippet_jump)
*<Plug>(neosnippet_jump)*
Jump to next place holder. Do not expand any snippet. When Jump to next place holder. Do not expand any snippet. When
you do not want to expand a snippet name, use this keymapping. you do not want to expand a snippet name, use this keymapping.
<Plug>(neocomplcache_start_unite_snippet) *<Plug>(neocomplcache_snippets_force_jump)*
*<Plug>(neocomplcache_start_unite_snippet)* Note: |<Plug>(neocomplcache_snippets_force_jump)| is
obsolute name.
i_<Plug>(neocomplcache_start_unite_snippet)
*i_<Plug>(neocomplcache_start_unite_snippet)*
Start unite snippet source. Start unite snippet source.
Note: This mappings is available in insert mode.
*<Plug>(neocomplcache_start_unite_snippet)*
Note: |<Plug>(neocomplcache_start_unite_snippet)| is obsolute
name.
neocomplcache#sources#snippets_complete#expandable() neocomplcache#sources#snippets_complete#expandable()
*neocomplcache#sources#snippets_complete#expandable()* *neocomplcache#sources#snippets_complete#expandable()*
@ -183,12 +210,12 @@ neocomplcache#sources#snippets_complete#get_snippets_dir()
EXAMPLES *neosnippet-examples* EXAMPLES *neosnippet-examples*
> >
" Plugin key-mappings. " Plugin key-mappings.
imap <C-k> <Plug>(neocomplcache_snippets_expand) imap <C-k> <Plug>(neosnippet_expand)
smap <C-k> <Plug>(neocomplcache_snippets_expand) smap <C-k> <Plug>(neosnippet_expand)
" SuperTab like snippets behavior. " SuperTab like snippets behavior.
"imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ? "imap <expr><TAB> neosnippet#expandable() ?
" \ "\<Plug>(neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>" " \ "\<Plug>(neosnippet_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>"
" For snippet_complete marker. " For snippet_complete marker.
if has('conceal') if has('conceal')

View File

@ -71,6 +71,11 @@ imap <silent> <Plug>(neocomplcache_snippets_force_jump)
\ <Plug>(neosnippet_jump) \ <Plug>(neosnippet_jump)
smap <silent> <Plug>(neocomplcache_snippets_force_jump) smap <silent> <Plug>(neocomplcache_snippets_force_jump)
\ <Plug>(neosnippet_jump) \ <Plug>(neosnippet_jump)
imap <silent> <Plug>(neocomplcache_start_unite_snippet)
\ <Plug>(neosnippet_start_unite_snippet)
inoremap <expr><silent> <Plug>(neosnippet_start_unite_snippet)
\ unite#sources#snippet#start_complete()
"}}} "}}}
augroup neosnippet"{{{ augroup neosnippet"{{{