When I open or create any file via vim as a user I get this error: “E303: Unable to open swapfile for “filename”, recovery impossible”, I don’t get this error when running vim as root or sudo, this is a fresh install of EndeavourOS with lxqt DE. I tried removing current swapfile and creating a bigger one.
The vim swap file is nothing to do with the system swap, it’s specifically for the use of the vim editor.
It sounds like you have a permission issue with the swap file location, you don’t have write access. The article I linked to shows how to set the location to somewhere with correct permissions.
Yes, I changed “tmp” to “temp” and now vim doesn’t show this error. However this doesn’t look like something you have to do after installing vim, something’s still not right either with vim or this distro.
I don’t really like this solution, there’s probably an underlying issue at place because as I said this was never a thing on other distributions as well as this one, maybe something is wrong with lxqt flavor, but oh well.