1
0
mirror of https://github.com/amix/vimrc synced 2025-06-27 10:05:01 +08:00

Added gist-vim

This commit is contained in:
Amir Salihefendic
2019-11-16 18:40:53 +01:00
parent f33d38b90c
commit 01890d8b5d
9 changed files with 2153 additions and 5 deletions

View File

@ -13,7 +13,6 @@ import requests
from os import path
#--- Globals ----------------------------------------------
PLUGINS = """
auto-pairs https://github.com/jiangmiao/auto-pairs
@ -57,6 +56,7 @@ vim-abolish https://github.com/tpope/tpope-vim-abolish
mru.vim https://github.com/vim-scripts/mru.vim
vim-markdown https://github.com/plasticboy/vim-markdown
comfortable-motion.vim https://github.com/yuttie/comfortable-motion.vim
gist-vim https://github.com/mattn/gist-vim
""".strip()
GITHUB_ZIP = '%s/archive/master.zip'
@ -74,8 +74,8 @@ def download_extract_replace(plugin_name, zip_path, temp_dir, source_dir):
zip_f = zipfile.ZipFile(temp_zip_path)
zip_f.extractall(temp_dir)
plugin_temp_path = path.join(temp_dir,
path.join(temp_dir, '%s-master' % plugin_name))
plugin_temp_path = path.join(
temp_dir, path.join(temp_dir, '%s-master' % plugin_name))
# Remove the current plugin and replace it with the extracted
plugin_dest_path = path.join(source_dir, plugin_name)
@ -92,8 +92,7 @@ def download_extract_replace(plugin_name, zip_path, temp_dir, source_dir):
def update(plugin):
name, github_url = plugin.split(' ')
zip_path = GITHUB_ZIP % github_url
download_extract_replace(name, zip_path,
temp_directory, SOURCE_DIR)
download_extract_replace(name, zip_path, temp_directory, SOURCE_DIR)
if __name__ == '__main__':