From 3b261cc736c204b0e60444cce61c49ed7f996bee Mon Sep 17 00:00:00 2001 From: Lucas Noki Date: Tue, 17 Dec 2019 23:36:42 +0100 Subject: [PATCH] Add check if vimdir exists, add vimdir if not and make autoload dir --- modules/vim/module.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/vim/module.py b/modules/vim/module.py index f689b1f..947a9ef 100644 --- a/modules/vim/module.py +++ b/modules/vim/module.py @@ -60,4 +60,14 @@ class VimModule(IModule): for element in clean_plugin_list: selection = element -1 vimrc_file.write(plugins[selection][1] + "\n") - vimrc_file.write("call plug#end()\n") \ No newline at end of file + 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) \ No newline at end of file