mirror of
https://github.com/gryf/snipmate.vim.git
synced 2026-02-25 05:05:51 +01:00
made GetSnippets() a public function
This commit is contained in:
@@ -23,11 +23,11 @@ if empty(snippets_dir) | finish | endif
|
|||||||
if isdirectory(snippets_dir.'_')
|
if isdirectory(snippets_dir.'_')
|
||||||
call ExtractSnips(snippets_dir.'_', '_')
|
call ExtractSnips(snippets_dir.'_', '_')
|
||||||
endif
|
endif
|
||||||
au FileType * call s:GetSnippets()
|
au FileType * call GetSnippets(g:snippets_dir)
|
||||||
fun s:GetSnippets()
|
fun GetSnippets(dir)
|
||||||
for ft in split(&ft, '\.')
|
for ft in split(&ft, '\.')
|
||||||
if !exists('g:did_ft_'.ft) && isdirectory(g:snippets_dir.ft)
|
if !exists('g:did_ft_'.ft) && isdirectory(a:dir.ft)
|
||||||
call ExtractSnips(g:snippets_dir.ft, ft)
|
call ExtractSnips(a:dir.ft, ft)
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
endf
|
endf
|
||||||
|
|||||||
Reference in New Issue
Block a user