diff --git a/autoload/neocomplcache/sources/snippets_complete.vim b/autoload/neocomplcache/sources/snippets_complete.vim index 2c2d203..94af0a1 100644 --- a/autoload/neocomplcache/sources/snippets_complete.vim +++ b/autoload/neocomplcache/sources/snippets_complete.vim @@ -29,13 +29,15 @@ set cpo&vim let s:source = { \ 'name' : 'snippets_complete', - \ 'kind' : 'plugin', + \ 'kind' : 'complfunc', \} function! s:source.initialize()"{{{ " Initialize. call neocomplcache#set_dictionary_helper( \ g:neocomplcache_source_rank, 'snippets_complete', 8) + call neocomplcache#set_completion_length('snippets_complete', + \ g:neocomplcache_auto_completion_start_length) endfunction"}}} function! s:source.finalize()"{{{ @@ -50,7 +52,11 @@ function! s:source.finalize()"{{{ endif endfunction"}}} -function! s:source.get_keyword_list(cur_keyword_str)"{{{ +function! s:source.get_keyword_pos(cur_text)"{{{ + return match(a:cur_text, '\S\+$') +endfunction"}}} + +function! s:source.get_complete_words(cur_keyword_pos, cur_keyword_str)"{{{ let all_snippets = neosnippet#get_snippets() for filetype in neocomplcache#get_source_filetypes( diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 1252d2b..b3486e3 100644 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -368,6 +368,7 @@ CHANGELOG *neosnippet-changelog* - Improved for filetype. - Improved filetype complete. - Improved documentation. +- Changed neocomplcache source behavior. 2012-09-27 - Ver.3 development is started.