diff options
| author | jdhao <jdhao@hotmail.com> | 2022-01-13 01:51:19 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2022-01-13 01:51:19 +0800 |
| commit | 6fd71557872092d6585ae8ab86605b5573ad6061 (patch) | |
| tree | 8e8139e8779ef5d6d6a2fa6c7949ae6bfc736f55 /core/autocommands.vim | |
| parent | 665250fe588927782182cdcac7f22b46f3274b56 (diff) | |
feat: create parent dir of current file if it does not exist
Diffstat (limited to 'core/autocommands.vim')
| -rw-r--r-- | core/autocommands.vim | 5 |
1 files changed, 5 insertions, 0 deletions
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 <afile> | PackerCompile augroup END + +augroup auto_create_dir + autocmd! + autocmd BufWritePre * call utils#may_create_dir(expand("<afile>")) +augroup END |
