- 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
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" Last Modified: 16 Mar 2013.
" Last Modified: 24 Mar 2013.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" 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
" reset refresh flag.
let snippet.neocomplcache__refresh = 0
let snippet.rank = 5
let snippet.rank = get(g:neocomplcache_source_rank,
\ 'snippets_complete', 8)
endfor
if len(a:cur_keyword_str) > 1 && a:cur_keyword_str =~ '^\h\w*$'
" Use partial match by word.
let partial_list = filter(values(a:snippets),
\ printf('stridx(v:val.word, %s) > 0',
\ string(a:cur_keyword_str)))
for snippet in partial_list
" Set refresh flag.
let snippet.neocomplcache__refresh = 1
let snippet.rank = 0
endfor
let list += partial_list
endif
" if len(a:cur_keyword_str) > 1 && a:cur_keyword_str =~ '^\h\w*$'
" " Use partial match by word.
" let partial_list = filter(values(a:snippets),
" \ printf('stridx(v:val.word, %s) > 0',
" \ string(a:cur_keyword_str)))
" for snippet in partial_list
" " Set refresh flag.
" let snippet.neocomplcache__refresh = 1
" let snippet.rank = 0
" endfor
"
" let list += partial_list
" endif
" Add cur_keyword_str snippet.
if has_key(a:snippets, a:cur_keyword_str)

View File

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