- Improved convert description behavior.
This commit is contained in:
parent
5ccca08ff8
commit
17ab5b07f0
@ -410,10 +410,10 @@ function! s:parse_snippet_name(snippets_file, line, linenr, dup_check)"{{{
|
|||||||
" Fall back to using the name and description (abbr) combined.
|
" Fall back to using the name and description (abbr) combined.
|
||||||
" SnipMate snippets may have duplicate names, but different
|
" SnipMate snippets may have duplicate names, but different
|
||||||
" descriptions (abbrs).
|
" descriptions (abbrs).
|
||||||
let description = matchstr(a:line, '^snippet\s\+\zs.*$')
|
let description = matchstr(a:line, '^snippet\s\+\S\+\zs.*$')
|
||||||
if description !=# snippet_dict.name
|
if description !=# snippet_dict.name
|
||||||
" Convert description.
|
" Convert description.
|
||||||
let snippet_dict.name =
|
let snippet_dict.name .= '_' .
|
||||||
\ substitute(description, '\W\+', '_', 'g')
|
\ substitute(description, '\W\+', '_', 'g')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user