aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2022-08-20 00:52:33 -0500
committerGitHub <noreply@github.com>2022-08-20 00:52:33 -0500
commitfdf8236fc26a20498b4b342cfc742c8482d95731 (patch)
tree275d40b627bf60635f9f912ec34de3b5e2adf5c9 /core
parentefa7b215e7010de3d1d03cc3e4adbc5ca89f3b26 (diff)
parent085c8017d8ed3c83d1f61306d6b42f460d2857bc (diff)
Merge pull request #69 from jdhao/fix-autocmd
update the autocmd for saving a file
Diffstat (limited to 'core')
-rw-r--r--core/autocommands.vim2
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