From caa3eea0b9da75dd5e1cb99d2d936311dfd9bb1d Mon Sep 17 00:00:00 2001 From: Lucas Noki Date: Tue, 7 Jan 2020 16:27:38 +0100 Subject: [PATCH] Extract URL into json_config file, remove the reverse function Uncomment the self.exec_plugin_manager function --- modules/vim/module.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/vim/module.py b/modules/vim/module.py index a7c0b9b..370d01d 100644 --- a/modules/vim/module.py +++ b/modules/vim/module.py @@ -31,8 +31,10 @@ class VimModule(AbstractModule): if os.path.isfile(str(get_vim_root().joinpath("autoload", "plug.vim"))): print("Vimplug already installed!") else: - curl_request = "curl https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim " + \ - "-o " + \ + pluginmanager_url = self.json_config['pluginmanager_url'] + curl_request = "curl " + \ + pluginmanager_url + \ + " -o " + \ str(get_vim_root().joinpath("autoload", "plug.vim")) subprocess.call(curl_request, shell=True) @@ -77,9 +79,8 @@ class VimModule(AbstractModule): print("\n\033[4mDefault settings:\033[0m") [print(i) for i in default_settings] - default_settings.reverse() for setting in default_settings: - vimrc_content.insert(0, setting + "\n") + vimrc_content.append(setting + "\n") return vimrc_content def get_vimfile_working_copy(self): @@ -107,11 +108,9 @@ class VimModule(AbstractModule): subprocess.call(install_plugins, shell=True) def run(self): - self.create_folder_structure() self.get_vimplug_file() plugin_section = self.create_plugin_section() settings_section = self.create_setting_section() self.write_vimfile(settings_section + plugin_section) - # Uncomment when in production - # self.exec_plugin_manager() + self.exec_plugin_manager()