Created
March 19, 2009 23:33
-
-
Save fishman/82129 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun! GetSnippets(dir) | |
let snippetFiles = split(globpath(expand(a:dir), '**/*.snippet'), '\n') | |
for fullpath in snippetFiles | |
let tail = strpart(fullpath, strlen(expand(a:dir))) | |
let ft = substitute(tail, '^/\([^/]*\).*', '\1', '') | |
let keyword = substitute(tail, '^/[^/]*\(.*\)', '\1', '') | |
if !exists('g:did_ft_{ft}') | |
call ExtractSnips(fullpath, ft) | |
endif | |
endfor | |
endf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment