1
0
mirror of https://github.com/amix/vimrc synced 2025-07-08 09:35:00 +08:00

Added the Dracula colors scheme and use it as the default

This commit is contained in:
Amir
2021-07-30 22:53:30 +02:00
parent 65de68fa88
commit 97fed613a7
40 changed files with 1479 additions and 5 deletions

View File

@ -6,6 +6,7 @@ except ImportError:
except ImportError:
futures = None
import re
import zipfile
import shutil
import tempfile
@ -60,6 +61,7 @@ vim-python-pep8-indent https://github.com/Vimjas/vim-python-pep8-indent
vim-indent-guides https://github.com/nathanaelkane/vim-indent-guides
mru.vim https://github.com/vim-scripts/mru.vim
editorconfig-vim https://github.com/editorconfig/editorconfig-vim
dracula https://github.com/dracula/vim
""".strip()
GITHUB_ZIP = "%s/archive/master.zip"
@ -77,9 +79,9 @@ 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)
)
content_disp = req.headers.get("Content-Disposition")
filename = re.findall("filename=(.+).zip", content_disp)[0]
plugin_temp_path = path.join(temp_dir, path.join(temp_dir, filename))
# Remove the current plugin and replace it with the extracted
plugin_dest_path = path.join(source_dir, plugin_name)
@ -96,7 +98,10 @@ 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)
try:
download_extract_replace(name, zip_path, temp_directory, SOURCE_DIR)
except Exception as exp:
print("Could not update {}. Error was: {}".format(name, str(exp)))
if __name__ == "__main__":