auto save session

This commit is contained in:
xfy
2025-03-17 16:00:31 +08:00
parent d26fe338f6
commit 49fc19c88d
2 changed files with 6 additions and 0 deletions

View File

@ -225,3 +225,8 @@ autocmd({ "BufReadPre" }, {
group = aug, group = aug,
pattern = "*", pattern = "*",
}) })
-- 在 Vim 退出前保存会话
autocmd("VimLeavePre", {
command = ":SessionSave",
})

View File

@ -2,6 +2,7 @@ return {
"rmagatti/auto-session", "rmagatti/auto-session",
lazy = true, lazy = true,
cmd = { cmd = {
"SessionSave",
"SessionRestore", "SessionRestore",
}, },
-- event = "VeryLazy", -- event = "VeryLazy",