Change curl request to format string
Put plugin manager installation in plugin selection and only if plugins are selected
This commit is contained in:
parent
92fad36fce
commit
b15474edaf
@ -30,11 +30,10 @@ class VimModule(AbstractModule):
|
||||
if os.path.isfile(str(get_vim_root().joinpath("autoload", "plug.vim"))):
|
||||
print("Vimplug already installed!")
|
||||
else:
|
||||
pluginmanager_url = self.json_config['pluginmanager_url']
|
||||
curl_request = "curl " + \
|
||||
pluginmanager_url + \
|
||||
" -o " + \
|
||||
str(get_vim_root().joinpath("autoload", "plug.vim"))
|
||||
curl_request = "curl {} -o {}".format(
|
||||
self.json_config['pluginmanager_url'],
|
||||
str(get_vim_root().joinpath("autoload", "plug.vim"))
|
||||
)
|
||||
subprocess.call(curl_request, shell=True)
|
||||
|
||||
def create_plugin_section(self):
|
||||
@ -50,6 +49,8 @@ class VimModule(AbstractModule):
|
||||
}
|
||||
]
|
||||
selected_plugins = prompt(plugin_selection)['modules']
|
||||
if len(selected_plugins) > 0:
|
||||
self.get_vimplug_file()
|
||||
print("\033[4mYour selection:\033[0m")
|
||||
[print(x) for x in selected_plugins]
|
||||
|
||||
@ -101,7 +102,6 @@ class VimModule(AbstractModule):
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user