- Fixed snippet source behavior.
This commit is contained in:
parent
54b9c1d128
commit
c214bafc5b
@ -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: 03 Mar 2012.
|
" Last Modified: 07 Mar 2012.
|
||||||
" 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" FILE: snippet.vim
|
" FILE: snippet.vim
|
||||||
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
||||||
" Last Modified: 02 Feb 2012.
|
" Last Modified: 07 Mar 2012.
|
||||||
" 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
|
||||||
@ -53,8 +53,10 @@ let s:source = {
|
|||||||
\ }
|
\ }
|
||||||
|
|
||||||
function! s:source.hooks.on_init(args, context) "{{{
|
function! s:source.hooks.on_init(args, context) "{{{
|
||||||
let a:context.source__cur_keyword_pos = s:get_keyword_pos(neocomplcache#get_cur_text(1))
|
let a:context.source__cur_keyword_pos =
|
||||||
let a:context.source__snippets = sort(values(neocomplcache#sources#snippets_complete#get_snippets()), 's:compare_words')
|
\ s:get_keyword_pos(neocomplcache#get_cur_text(1))
|
||||||
|
let a:context.source__snippets =
|
||||||
|
\ sort(values(neocomplcache#sources#snippets_complete#get_snippets()), 's:compare_words')
|
||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
|
|
||||||
function! s:source.gather_candidates(args, context) "{{{
|
function! s:source.gather_candidates(args, context) "{{{
|
||||||
@ -88,7 +90,8 @@ let s:action_table.expand = {
|
|||||||
function! s:action_table.expand.func(candidate)"{{{
|
function! s:action_table.expand.func(candidate)"{{{
|
||||||
let context = unite#get_context()
|
let context = unite#get_context()
|
||||||
call neocomplcache#sources#snippets_complete#expand(
|
call neocomplcache#sources#snippets_complete#expand(
|
||||||
\ neocomplcache#get_cur_text(1), context.col,
|
\ neocomplcache#get_cur_text(1) . a:candidate.action__complete_word,
|
||||||
|
\ context.col,
|
||||||
\ a:candidate.action__complete_word)
|
\ a:candidate.action__complete_word)
|
||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
|
|
||||||
|
@ -296,6 +296,7 @@ CHANGELOG *neocomplcache-snippets-complete-changelog*
|
|||||||
|
|
||||||
2012-03-07
|
2012-03-07
|
||||||
- Added snippet source.
|
- Added snippet source.
|
||||||
|
- Fixed snippet source behavior.
|
||||||
|
|
||||||
2012-03-06
|
2012-03-06
|
||||||
- Improved ftplugin.
|
- Improved ftplugin.
|
||||||
|
Loading…
Reference in New Issue
Block a user