From 5c89e3193b64474227f8ad57da70d13ea20bc714 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sun, 24 Mar 2013 20:35:25 +0900 Subject: [PATCH] - Disabled partial match. --- .../sources/snippets_complete.vim | 31 ++++++++++--------- doc/neosnippet.txt | 1 + 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/autoload/neocomplcache/sources/snippets_complete.vim b/autoload/neocomplcache/sources/snippets_complete.vim index 187a3e5..f67c105 100644 --- a/autoload/neocomplcache/sources/snippets_complete.vim +++ b/autoload/neocomplcache/sources/snippets_complete.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: snippets_complete.vim " AUTHOR: Shougo Matsushita -" 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) diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index f080b95..064ebb9 100755 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -753,6 +753,7 @@ CHANGELOG *neosnippet-changelog* 2013-03-24 - Improved documentation. - Added ruby snippets. +- Disabled partial match. 2013-03-21 - Added sql snippet.