Add :Mkdir command to create directories

This commit is contained in:
Kenneth Benzie 2024-04-07 18:59:50 +01:00
parent 93bea02a48
commit 057c706699

View File

@ -101,7 +101,14 @@ end, {
-- TODO: :Chmod -- TODO: :Chmod
-- TODO: :Mkdir -- :Mkdir create a directory, bang to create intermediate directories
vim.api.nvim_create_user_command('Mkdir', function(opts)
local flags = nil
if opts.bang then
flags = 'p'
end
vim.fn.mkdir(opts.args, flags)
end, { bang = true, nargs = 1 })
-- :Rg grep for the given string and fuzzy find the results, bang to enable -- :Rg grep for the given string and fuzzy find the results, bang to enable
-- regex in given string -- regex in given string