1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

use lua for may_create_dir

This commit is contained in:
jdhao
2022-01-13 20:27:48 +08:00
parent 6fd7155787
commit 146ef5d0b8
3 changed files with 11 additions and 10 deletions

View File

@@ -207,12 +207,3 @@ function! utils#add_pack(name) abort
return l:status
endfunction
" Create the parent dir for current file if it does not exist
function! utils#may_create_dir(path) abort
let l:parent_dir = fnamemodify(a:path, ':p:h')
if !isdirectory(l:parent_dir)
call mkdir(l:parent_dir, "p")
endif
endfunction