diff --git a/autoload/neosnippet.vim b/autoload/neosnippet.vim index 9e4c09d..6bb89cb 100644 --- a/autoload/neosnippet.vim +++ b/autoload/neosnippet.vim @@ -411,11 +411,12 @@ function! s:parse_snippet_name(snippets_file, line, linenr, dup_check)"{{{ " Fall back to using the name and description (abbr) combined. " SnipMate snippets may have duplicate names, but different " descriptions (abbrs). - let description = matchstr(a:line, '^snippet\s\+\zs.*$') - if description !=# snippet_dict.name + let description = matchstr(a:line, '^snippet\s\+\S\+\s\+\zs.*$') + if description != '' && description !=# snippet_dict.name " Convert description. - let snippet_dict.name = - \ substitute(description, '\W\+', '_', 'g') + let snippet_dict.name .= '_' . + \ substitute(substitute( + \ description, '\W\+', '_', 'g'), '_\+$', '', '') endif " Collect the description (abbr) of the snippet, if set on snippet line. diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 0c83a69..775bbaf 100755 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -717,6 +717,7 @@ CHANGELOG *neosnippet-changelog* - Fixed error in java snippet. - Improved snippet rank. - Improved keyword filter behavior. +- Fixed convert description. 2012-11-07 - Fixed s:indent_snippet().