Remove try except for vimfile creation

This commit is contained in:
Marcel Schwarz 2020-01-12 19:00:19 +01:00
parent 73a3bb044c
commit 05585630ed

View File

@ -54,12 +54,6 @@ class VimModule(AbstractModule):
print("\033[4mYour selection:\033[0m") print("\033[4mYour selection:\033[0m")
[print(x) for x in selected_plugins] [print(x) for x in selected_plugins]
try:
index = vimrc_content.index("call plug#begin('~/.vim/plugged')\n") + 1
for plugin in selected_plugins:
vimrc_content.insert(index, plugins[plugin] + "\n")
except ValueError:
vimrc_content.append("call plug#begin('~/.vim/plugged')\n") vimrc_content.append("call plug#begin('~/.vim/plugged')\n")
for element in selected_plugins: for element in selected_plugins:
vimrc_content.append(plugins[element] + "\n") vimrc_content.append(plugins[element] + "\n")