- Fixed snippet parser.
This commit is contained in:
parent
177940ae3a
commit
bbf1f43ec5
@ -347,8 +347,8 @@ function! s:parse_snippets_file(snippets, snippets_file)"{{{
|
|||||||
let line = substitute(line, '\s\+$', '', '')
|
let line = substitute(line, '\s\+$', '', '')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if line =~ '^#'
|
if line =~ '^#' || line == ''
|
||||||
" Comment.
|
" Ignore.
|
||||||
elseif line =~ '^include'
|
elseif line =~ '^include'
|
||||||
" Include snippets.
|
" Include snippets.
|
||||||
let filename = matchstr(line, '^include\s\+\zs.*$')
|
let filename = matchstr(line, '^include\s\+\zs.*$')
|
||||||
@ -373,13 +373,13 @@ function! s:parse_snippets_file(snippets, snippets_file)"{{{
|
|||||||
let snippet_dict = s:parse_snippet_name(
|
let snippet_dict = s:parse_snippet_name(
|
||||||
\ line, linenr, dup_check)
|
\ line, linenr, dup_check)
|
||||||
elseif !empty(snippet_dict)
|
elseif !empty(snippet_dict)
|
||||||
if line =~ '^\s' || line == ''
|
if line =~ '^\s'
|
||||||
" Substitute one tab character or spaces.
|
" Substitute one tab character or spaces.
|
||||||
if snippet_dict.word != ''
|
" if snippet_dict.word != ''
|
||||||
let snippet_dict.word .= "\n"
|
" let snippet_dict.word .= "\n"
|
||||||
endif
|
" endif
|
||||||
let snippet_dict.word .=
|
let snippet_dict.word .=
|
||||||
\ substitute(line, '^\%(\t\| *\)', '', '')
|
\ substitute(line, '^\%(\t\| *\)', '', '') . "\n"
|
||||||
else
|
else
|
||||||
call s:add_snippet_attribute(line, linenr, snippet_dict)
|
call s:add_snippet_attribute(line, linenr, snippet_dict)
|
||||||
endif
|
endif
|
||||||
|
@ -690,6 +690,7 @@ CHANGELOG *neosnippet-changelog*
|
|||||||
|
|
||||||
2012-11-05
|
2012-11-05
|
||||||
- Fixed for comment string.
|
- Fixed for comment string.
|
||||||
|
- Fixed snippet parser.
|
||||||
|
|
||||||
2012-11-04
|
2012-11-04
|
||||||
- Improved completion behavior.
|
- Improved completion behavior.
|
||||||
|
Loading…
Reference in New Issue
Block a user