- Fixed for echodoc.

This commit is contained in:
Shougo Matsushita 2012-03-17 22:53:56 +09:00
parent 16a651924c
commit 60969f5ac0
2 changed files with 32 additions and 31 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 2012. " Last Modified: 17 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
@ -203,8 +203,6 @@ function! s:doc_dict.search(cur_text)"{{{
call add(ret, { 'text' : snip.word, 'highlight' : 'String' }) call add(ret, { 'text' : snip.word, 'highlight' : 'String' })
call add(ret, { 'text' : ' ' }) call add(ret, { 'text' : ' ' })
call add(ret, { 'text' : snip.menu, 'highlight' : 'Special' }) call add(ret, { 'text' : snip.menu, 'highlight' : 'Special' })
call add(ret, { 'text' : ' ' })
call add(ret, { 'text' : snip.snip})
return ret return ret
endfunction"}}} endfunction"}}}
@ -275,14 +273,16 @@ function! s:caching()"{{{
endfunction"}}} endfunction"}}}
function! s:set_snippet_dict(snippet_pattern, snippet_dict, dup_check, snippets_file)"{{{ function! s:set_snippet_dict(snippet_pattern, snippet_dict, dup_check, snippets_file)"{{{
if has_key(a:snippet_pattern, 'name') if !has_key(a:snippet_pattern, 'name')
return
endif
let pattern = s:set_snippet_pattern(a:snippet_pattern) let pattern = s:set_snippet_pattern(a:snippet_pattern)
let action_pattern = '^snippet\s\+' . a:snippet_pattern.name . '$' let action_pattern = '^snippet\s\+' . a:snippet_pattern.name . '$'
let a:snippet_dict[a:snippet_pattern.name] = pattern let a:snippet_dict[a:snippet_pattern.name] = pattern
let a:dup_check[a:snippet_pattern.name] = 1 let a:dup_check[a:snippet_pattern.name] = 1
if has_key(a:snippet_pattern, 'alias') for alias in get(a:snippet_pattern, 'alias', [])
for alias in a:snippet_pattern.alias
let alias_pattern = copy(pattern) let alias_pattern = copy(pattern)
let alias_pattern.word = alias let alias_pattern.word = alias
@ -297,13 +297,11 @@ function! s:set_snippet_dict(snippet_pattern, snippet_dict, dup_check, snippets_
let a:snippet_dict[alias] = alias_pattern let a:snippet_dict[alias] = alias_pattern
let a:dup_check[alias] = 1 let a:dup_check[alias] = 1
endfor endfor
endif
let snippet = a:snippet_dict[a:snippet_pattern.name] let snippet = a:snippet_dict[a:snippet_pattern.name]
let snippet.action__path = a:snippets_file let snippet.action__path = a:snippets_file
let snippet.action__pattern = action_pattern let snippet.action__pattern = action_pattern
let snippet.real_name = a:snippet_pattern.name let snippet.real_name = a:snippet_pattern.name
endif
endfunction"}}} endfunction"}}}
function! s:set_snippet_pattern(dict)"{{{ function! s:set_snippet_pattern(dict)"{{{
let abbr_pattern = printf('%%.%ds..%%s', let abbr_pattern = printf('%%.%ds..%%s',

View File

@ -295,6 +295,9 @@ snippet *neocomplcache-snippets-complete-unite-action-snippet*
============================================================================== ==============================================================================
CHANGELOG *neocomplcache-snippets-complete-changelog* CHANGELOG *neocomplcache-snippets-complete-changelog*
2012-03-17
- Fixed for echodoc.
2012-03-16 2012-03-16
- Fixed snippets indentation. - Fixed snippets indentation.