diff --git a/lua/persistence/init.lua b/lua/persistence/init.lua index 05fcd60..780c14b 100644 --- a/lua/persistence/init.lua +++ b/lua/persistence/init.lua @@ -5,7 +5,11 @@ local M = {} local e = vim.fn.fnameescape function M.get_current() - local name = vim.fn.getcwd():gsub("/", "%%") + local pattern = "/" + if vim.fn.has("win32") then + pattern = '[\\:]' + end + local name = vim.fn.getcwd():gsub(pattern, "%%") return Config.options.dir .. name .. ".vim" end