diff options
| author | jdhao <jdhao@hotmail.com> | 2022-08-20 13:50:23 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2022-08-20 13:50:23 +0800 |
| commit | 085c8017d8ed3c83d1f61306d6b42f460d2857bc (patch) | |
| tree | 275d40b627bf60635f9f912ec34de3b5e2adf5c9 /core | |
| parent | efa7b215e7010de3d1d03cc3e4adbc5ca89f3b26 (diff) | |
update the autocmd for saving a file
Diffstat (limited to 'core')
| -rw-r--r-- | core/autocommands.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/autocommands.vim b/core/autocommands.vim index 70b40db..c0c01d2 100644 --- a/core/autocommands.vim +++ b/core/autocommands.vim @@ -133,7 +133,7 @@ augroup END augroup auto_create_dir autocmd! - autocmd BufWritePre * lua require('utils').may_create_dir() + autocmd BufWritePre * lua require('utils').may_create_dir(vim.fn.fnamemodify(vim.fn.expand('<afile>'), ":p:h")) augroup END " ref: https://vi.stackexchange.com/a/169/15292 |
