Extract URL into json_config file, remove the reverse function

Uncomment the self.exec_plugin_manager function
This commit is contained in:
Lucas Noki 2020-01-07 16:27:38 +01:00 committed by Marcel Schwarz
parent 34851105c9
commit caa3eea0b9

View File

@ -31,7 +31,9 @@ class VimModule(AbstractModule):
if os.path.isfile(str(get_vim_root().joinpath("autoload", "plug.vim"))): if os.path.isfile(str(get_vim_root().joinpath("autoload", "plug.vim"))):
print("Vimplug already installed!") print("Vimplug already installed!")
else: else:
curl_request = "curl https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim " + \ pluginmanager_url = self.json_config['pluginmanager_url']
curl_request = "curl " + \
pluginmanager_url + \
" -o " + \ " -o " + \
str(get_vim_root().joinpath("autoload", "plug.vim")) str(get_vim_root().joinpath("autoload", "plug.vim"))
subprocess.call(curl_request, shell=True) subprocess.call(curl_request, shell=True)
@ -77,9 +79,8 @@ class VimModule(AbstractModule):
print("\n\033[4mDefault settings:\033[0m") print("\n\033[4mDefault settings:\033[0m")
[print(i) for i in default_settings] [print(i) for i in default_settings]
default_settings.reverse()
for setting in default_settings: for setting in default_settings:
vimrc_content.insert(0, setting + "\n") vimrc_content.append(setting + "\n")
return vimrc_content return vimrc_content
def get_vimfile_working_copy(self): def get_vimfile_working_copy(self):
@ -107,11 +108,9 @@ class VimModule(AbstractModule):
subprocess.call(install_plugins, shell=True) subprocess.call(install_plugins, shell=True)
def run(self): def run(self):
self.create_folder_structure() self.create_folder_structure()
self.get_vimplug_file() self.get_vimplug_file()
plugin_section = self.create_plugin_section() plugin_section = self.create_plugin_section()
settings_section = self.create_setting_section() settings_section = self.create_setting_section()
self.write_vimfile(settings_section + plugin_section) self.write_vimfile(settings_section + plugin_section)
# Uncomment when in production self.exec_plugin_manager()
# self.exec_plugin_manager()