1
0

Submodules for vim plugins

This commit is contained in:
Noah 2014-12-05 17:30:44 -08:00
parent 88c3671e74
commit d68e711e5a
2 changed files with 57 additions and 0 deletions

30
.gitmodules vendored Normal file
View File

@ -0,0 +1,30 @@
[submodule "home/.vim/bundle/Vundle.vim"]
path = home/.vim/bundle/Vundle.vim
url = https://github.com/gmarik/Vundle.vim
[submodule "home/.vim/bundle/nerdtree"]
path = home/.vim/bundle/nerdtree
url = https://github.com/scrooloose/nerdtree
[submodule "home/.vim/bundle/vim-nerdtree-tabs"]
path = home/.vim/bundle/vim-nerdtree-tabs
url = https://github.com/jistr/vim-nerdtree-tabs
[submodule "home/.vim/bundle/vim-airline"]
path = home/.vim/bundle/vim-airline
url = https://github.com/bling/vim-airline
[submodule "home/.vim/bundle/tagbar"]
path = home/.vim/bundle/tagbar
url = https://github.com/majutsushi/tagbar
[submodule "home/.vim/bundle/molokai"]
path = home/.vim/bundle/molokai
url = https://github.com/tomasr/molokai
[submodule "home/.vim/bundle/ctrlp.vim"]
path = home/.vim/bundle/ctrlp.vim
url = https://github.com/kien/ctrlp.vim
[submodule "home/.vim/bundle/vim-coffee-script"]
path = home/.vim/bundle/vim-coffee-script
url = https://github.com/kchmck/vim-coffee-script
[submodule "home/.vim/bundle/vim-markdown"]
path = home/.vim/bundle/vim-markdown
url = https://github.com/tpope/vim-markdown
[submodule "home/.vim/bundle/editorconfig-vim"]
path = home/.vim/bundle/editorconfig-vim
url = https://github.com/editorconfig/editorconfig-vim

27
make-submodules.py Normal file
View File

@ -0,0 +1,27 @@
#!/usr/bin/env python
"""Script to generate the .gitmodules file for the vim plugins."""
import re
# Open the files
vimrc = open("home/.vimrc", "r")
outfh = open(".gitmodules", "w")
for line in vimrc.readlines():
line = line.strip()
match = re.search(r"Plugin '(\w+?)/([A-Za-z0-9.-]+?)'", line)
if match:
username = match.group(1)
repo = match.group(2)
path = "home/.vim/bundle/{}".format(repo)
url = "https://github.com/{}/{}".format(username, repo)
print "Submodule:", url
outfh.write("[submodule \"{}\"]\n".format(path))
outfh.write("\tpath = {}\n".format(path))
outfh.write("\turl = {}\n".format(url))
# Clean up.
vimrc.close()
outfh.close()