From 6fd71557872092d6585ae8ab86605b5573ad6061 Mon Sep 17 00:00:00 2001 From: jdhao Date: Thu, 13 Jan 2022 01:51:19 +0800 Subject: feat: create parent dir of current file if it does not exist --- core/autocommands.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core') diff --git a/core/autocommands.vim b/core/autocommands.vim index 6f08a90..c3943da 100644 --- a/core/autocommands.vim +++ b/core/autocommands.vim @@ -118,3 +118,8 @@ augroup packer_auto_compile autocmd! autocmd BufWritePost */nvim/lua/plugins.lua source | PackerCompile augroup END + +augroup auto_create_dir + autocmd! + autocmd BufWritePre * call utils#may_create_dir(expand("")) +augroup END -- cgit v1.2.3