This article introduces how to resolve the E482: Can’t create file /home/yuis/.vim/.vim_mru_files error that occurs when starting vim in WSL.
When I first started using vim, I had installed amix/vimrc, but when I opened vim after a long time, I got the E482: Can’t create file /home/yuis/.vim/.vim_mru_files error.
While it didn’t particularly interfere with file editing, the error was simply annoying, so I wanted to get rid of it.
Referring to E482 can’t create file · Issue #18 · yegappan/mru, I added let MRU_File = $HOME . ‘/.vim/.vim_mru_files’ to .vim_runtime\vimrcs\plugins_config.vim, but got the same error.
Since some directories were owned by root or had permissions set to 000, I also tried the following.
sudo chown -R yuis:yuis ~/.vim*
sudo chmod 777 -R ~/.vim*
The cause was that ~/.vim didn’t exist: resolved with mkdir ~/.vim
Speculation on the cause
WSL (Windows on Ubuntu) frequently has bugs. This is also why .bashrc permissions disappear. It’s reasonable to assume that this incident also occurred due to Windows system updates.