diff --git a/nvim/.config/nvim/lua/romanzy/commands.lua b/nvim/.config/nvim/lua/romanzy/commands.lua index a05752f..9a52182 100644 --- a/nvim/.config/nvim/lua/romanzy/commands.lua +++ b/nvim/.config/nvim/lua/romanzy/commands.lua @@ -17,6 +17,14 @@ uc("NormFormat", "!c_formatter_42 *.c *.h", { desc = "comply with the norm in C" vim.cmd("cnoreabbrev wn noautocmd write") +uc("GitBackup", function(opts) + vim.fn.system({ "git", "stash", "push", "-m", opts.args }) + vim.fn.system({ "git", "stash", "apply", "--index", "stash@{0}" }) +end, { + nargs = 1, + desc = "Stash changes without affecting the status", +}) + -- ac("LspAttach", { -- desc = "Notify user about attached LSP clients", -- group = aug("LSPOnAttach", { clear = true }),