Skip to content

Instantly share code, notes, and snippets.

@kljohann
Created July 22, 2013 18:54
Show Gist options
  • Save kljohann/6056515 to your computer and use it in GitHub Desktop.
Save kljohann/6056515 to your computer and use it in GitHub Desktop.
`:source %` this to print out all your [vundle](https://github.com/gmarik/vundle) bundles converted to [myrepos](http://myrepos.branchable.com/) format.
try
unlet s:mrconfig
"unlet s:bpath
catch /No such/
endtry
let s:mrconfig = []
for bundle in g:bundles
let s:bpath = bundle.path()
if $HOME != ''
let s:bpath = substitute(s:bpath, '^\V'.$HOME, '$HOME', '')
endif
call add(s:mrconfig, '['.s:bpath.']')
call add(s:mrconfig, 'checkout = git clone "'.bundle.uri.'" "'.bundle.name.'"')
call add(s:mrconfig, '')
endfor
let s:mrconfig_file = tempname()
call writefile(s:mrconfig, s:mrconfig_file)
execute 'silent pedit ' . s:mrconfig_file
wincmd P | wincmd H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment