Add check if vimdir exists, add vimdir if not and make autoload dir

This commit is contained in:
Lucas Noki 2019-12-17 23:36:42 +01:00 committed by Marcel Schwarz
parent 80b9e544e7
commit 3b261cc736

View File

@ -61,3 +61,13 @@ class VimModule(IModule):
selection = element -1
vimrc_file.write(plugins[selection][1] + "\n")
vimrc_file.write("call plug#end()\n")
vimdir_exists = os.path.isdir("/home/clay/Gitlab/linux-tools/testdirectory/")
if vimdir_exists:
install_vimplug = "cd ~/Gitlab/linux-tools/testdirectory/ && mkdir autoload && cd autoload && touch test.txt"
call(install_vimplug, shell=True)
else:
make_vimdir = "cd ~/Gitlab/linux-tools/ && mkdir testdirectory && cd testdirectory && mkdir autoload && cd autoload && touch test.txt"
call(make_vimdir, shell=True)