- Fixed error in snippet source.

This commit is contained in:
Shougo Matsushita 2013-03-05 22:54:52 +09:00
parent e8922aebeb
commit 85bb20d0cc
3 changed files with 8 additions and 6 deletions

View File

@ -1,7 +1,7 @@
"============================================================================= "=============================================================================
" FILE: neosnippet.vim " FILE: neosnippet.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com> " AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" Last Modified: 02 Mar 2013. " Last Modified: 05 Mar 2013.
" 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
@ -172,6 +172,7 @@ function! s:initialize_snippet(dict, path, line, pattern, name) "{{{
\ 'filter_str' : a:dict.name . ' ' . a:dict.abbr, \ 'filter_str' : a:dict.name . ' ' . a:dict.abbr,
\ 'description' : a:dict.word, \ 'description' : a:dict.word,
\ 'menu_template' : menu_prefix . abbr, \ 'menu_template' : menu_prefix . abbr,
\ 'menu_abbr' : abbr,
\ 'options' : a:dict.options, \ 'options' : a:dict.options,
\ 'action__path' : a:path, 'action__line' : a:line, \ 'action__path' : a:path, 'action__line' : a:line,
\ 'action__pattern' : a:pattern, 'real_name' : a:name, \ 'action__pattern' : a:pattern, 'real_name' : a:name,

View File

@ -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: 13 Dec 2012. " Last Modified: 05 Mar 2013.
" 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
@ -65,13 +65,13 @@ function! s:source.gather_candidates(args, context) "{{{
for keyword in a:context.source__snippets for keyword in a:context.source__snippets
let dict = { let dict = {
\ 'word' : keyword.word, \ 'word' : keyword.word,
\ 'abbr' : printf('%-50s %s', keyword.word, keyword.menu), \ 'abbr' : printf('%-50s %s', keyword.word, keyword.menu_abbr),
\ 'kind': 'snippet', \ 'kind': 'snippet',
\ 'action__complete_word' : keyword.word, \ 'action__complete_word' : keyword.word,
\ 'action__complete_pos' : keyword_pos, \ 'action__complete_pos' : keyword_pos,
\ 'action__path' : keyword.action__path, \ 'action__path' : keyword.action__path,
\ 'action__pattern' : keyword.action__pattern, \ 'action__pattern' : keyword.action__pattern,
\ 'source__menu' : keyword.menu, \ 'source__menu' : keyword.menu_abbr,
\ 'source__snip' : keyword.snip, \ 'source__snip' : keyword.snip,
\ 'source__snip_ref' : keyword, \ 'source__snip_ref' : keyword,
\ } \ }
@ -106,8 +106,6 @@ function! s:action_table.preview.func(candidates) "{{{
for snip in a:candidates for snip in a:candidates
echohl String echohl String
echo snip.action__complete_word echo snip.action__complete_word
echohl Special
echo snip.source__menu
echohl None echohl None
echo snip.source__snip echo snip.source__snip
echo ' ' echo ' '

View File

@ -741,6 +741,9 @@ Because neosnippet uses select-mode to jump over placeholder.
============================================================================== ==============================================================================
CHANGELOG *neosnippet-changelog* CHANGELOG *neosnippet-changelog*
2013-03-05
- Fixed error in snippet source.
2013-03-02 2013-03-02
- Ver.3.1 development is started. - Ver.3.1 development is started.
- Improved truncate menu behavior. - Improved truncate menu behavior.