Improve include implementation

This commit is contained in:
Shougo Matsushita 2015-12-23 21:17:56 +09:00
parent 457d5c8939
commit 4583b46376

View File

@ -83,13 +83,11 @@ function! s:parse(snippets_file) "{{{
" Ignore.
elseif line =~ '^include'
" Include snippets file.
let filename = matchstr(line, '^include\s\+\zs.*$')
for snippets_file in split(globpath(join(
for file in split(globpath(join(
\ neosnippet#helpers#get_snippets_directory(), ','),
\ filename), '\n')
\ matchstr(line, '^include\s\+\zs.*$')), '\n')
let snippets = extend(snippets,
\ neosnippet#parser#_parse_snippets(snippets_file))
\ neosnippet#parser#_parse_snippets(file))
endfor
elseif line =~ '^source'
" Source Vim script file.