Edit method for creating the initial vimrc file to be less error prone
This commit is contained in:
parent
4103c42724
commit
0c6744e378
@ -52,10 +52,9 @@ class VimModule(IModule):
|
|||||||
vimrc_out_file.write(line)
|
vimrc_out_file.write(line)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
vimrc_file = open("testfile", "w+")
|
with open("testfile", "w+") as vimrc_file:
|
||||||
vimrc_file.write("\n" + "call plug#begin('~/.vim/plugged')\n")
|
vimrc_file.write("\n" + "call plug#begin('~/.vim/plugged')\n")
|
||||||
for element in clean_plugin_list:
|
for element in clean_plugin_list:
|
||||||
selection = element -1
|
selection = element -1
|
||||||
vimrc_file.write(plugins[selection][1] + "\n")
|
vimrc_file.write(plugins[selection][1] + "\n")
|
||||||
vimrc_file.write("call plug#end()\n")
|
vimrc_file.write("call plug#end()\n")
|
||||||
vimrc_file.close()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user