From 85bb20d0cc621bd99a673a6899bc15dc69871827 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Tue, 5 Mar 2013 22:54:52 +0900 Subject: [PATCH] - Fixed error in snippet source. --- autoload/neosnippet.vim | 3 ++- autoload/unite/sources/snippet.vim | 8 +++----- doc/neosnippet.txt | 3 +++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/autoload/neosnippet.vim b/autoload/neosnippet.vim index d6fc7d3..967509a 100644 --- a/autoload/neosnippet.vim +++ b/autoload/neosnippet.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: neosnippet.vim " AUTHOR: Shougo Matsushita -" Last Modified: 02 Mar 2013. +" Last Modified: 05 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 @@ -172,6 +172,7 @@ function! s:initialize_snippet(dict, path, line, pattern, name) "{{{ \ 'filter_str' : a:dict.name . ' ' . a:dict.abbr, \ 'description' : a:dict.word, \ 'menu_template' : menu_prefix . abbr, + \ 'menu_abbr' : abbr, \ 'options' : a:dict.options, \ 'action__path' : a:path, 'action__line' : a:line, \ 'action__pattern' : a:pattern, 'real_name' : a:name, diff --git a/autoload/unite/sources/snippet.vim b/autoload/unite/sources/snippet.vim index 32f6f0a..ef48ae5 100644 --- a/autoload/unite/sources/snippet.vim +++ b/autoload/unite/sources/snippet.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: snippet.vim " AUTHOR: Shougo Matsushita -" Last Modified: 13 Dec 2012. +" Last Modified: 05 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 @@ -65,13 +65,13 @@ function! s:source.gather_candidates(args, context) "{{{ for keyword in a:context.source__snippets let dict = { \ 'word' : keyword.word, - \ 'abbr' : printf('%-50s %s', keyword.word, keyword.menu), + \ 'abbr' : printf('%-50s %s', keyword.word, keyword.menu_abbr), \ 'kind': 'snippet', \ 'action__complete_word' : keyword.word, \ 'action__complete_pos' : keyword_pos, \ 'action__path' : keyword.action__path, \ 'action__pattern' : keyword.action__pattern, - \ 'source__menu' : keyword.menu, + \ 'source__menu' : keyword.menu_abbr, \ 'source__snip' : keyword.snip, \ 'source__snip_ref' : keyword, \ } @@ -106,8 +106,6 @@ function! s:action_table.preview.func(candidates) "{{{ for snip in a:candidates echohl String echo snip.action__complete_word - echohl Special - echo snip.source__menu echohl None echo snip.source__snip echo ' ' diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 295a659..b6c9a12 100755 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -741,6 +741,9 @@ Because neosnippet uses select-mode to jump over placeholder. ============================================================================== CHANGELOG *neosnippet-changelog* +2013-03-05 +- Fixed error in snippet source. + 2013-03-02 - Ver.3.1 development is started. - Improved truncate menu behavior.