- Disabled partial match.

This commit is contained in:
Shougo Matsushita 2013-03-24 20:35:25 +09:00
parent f53e29aba1
commit 5c89e3193b
2 changed files with 17 additions and 15 deletions

View File

@ -1,7 +1,7 @@
"============================================================================= "=============================================================================
" FILE: snippets_complete.vim " FILE: snippets_complete.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com> " AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" Last Modified: 16 Mar 2013. " Last Modified: 24 Mar 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
@ -79,22 +79,23 @@ function! s:keyword_filter(snippets, cur_keyword_str) "{{{
for snippet in list for snippet in list
" reset refresh flag. " reset refresh flag.
let snippet.neocomplcache__refresh = 0 let snippet.neocomplcache__refresh = 0
let snippet.rank = 5 let snippet.rank = get(g:neocomplcache_source_rank,
\ 'snippets_complete', 8)
endfor endfor
if len(a:cur_keyword_str) > 1 && a:cur_keyword_str =~ '^\h\w*$' " if len(a:cur_keyword_str) > 1 && a:cur_keyword_str =~ '^\h\w*$'
" Use partial match by word. " " Use partial match by word.
let partial_list = filter(values(a:snippets), " let partial_list = filter(values(a:snippets),
\ printf('stridx(v:val.word, %s) > 0', " \ printf('stridx(v:val.word, %s) > 0',
\ string(a:cur_keyword_str))) " \ string(a:cur_keyword_str)))
for snippet in partial_list " for snippet in partial_list
" Set refresh flag. " " Set refresh flag.
let snippet.neocomplcache__refresh = 1 " let snippet.neocomplcache__refresh = 1
let snippet.rank = 0 " let snippet.rank = 0
endfor " endfor
"
let list += partial_list " let list += partial_list
endif " endif
" Add cur_keyword_str snippet. " Add cur_keyword_str snippet.
if has_key(a:snippets, a:cur_keyword_str) if has_key(a:snippets, a:cur_keyword_str)

View File

@ -753,6 +753,7 @@ CHANGELOG *neosnippet-changelog*
2013-03-24 2013-03-24
- Improved documentation. - Improved documentation.
- Added ruby snippets. - Added ruby snippets.
- Disabled partial match.
2013-03-21 2013-03-21
- Added sql snippet. - Added sql snippet.