ThePrimeagen / ThePrimeagen/init.lua
Undo doesn't work in Windows
Open
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4k
- Forks
- 680
- PR merge metrics
- No merged PRs in 30d
Description
There is no environment variable HOME in windows. So, this fails vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir".
This is the solution:
local home = os.getenv("HOME")
if (home == nil) then
home = os.getenv("UserProfile")
end
opt.undodir = home .. "/.vim/undodir"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the undodir assignment shown in the issue and inspect how the HOME value is read on Windows. Done means the undodir path also resolves when HOME is unavailable, using the Windows user profile value described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100