Move default_settings creation out of try block

This commit is contained in:
Marcel Schwarz 2019-12-28 05:19:34 +01:00
parent 10aaf41b38
commit 33ae820b94

View File

@ -67,15 +67,16 @@ class VimModule(AbstractModule):
for plugin in selected_plugins:
vimrc_content.insert(index, self.plugins[plugin] + "\n")
default_settings.reverse()
for setting in default_settings:
vimrc_content.insert(index - 1, setting + "\n")
except ValueError:
vimrc_content.append("call plug#begin('~/.vim/plugged')\n")
for element in selected_plugins:
vimrc_content.append(self.plugins[element] + "\n")
vimrc_content.append("call plug#end()\n")
default_settings.reverse()
for setting in default_settings:
vimrc_content.insert(0, setting + "\n")
seen = set()
seen_add = seen.add
vimrc_content = [x1 for x1 in vimrc_content if not (x1 in seen or seen_add(x1))]