flathub / flathub/org.vim.Vim

.swp files can't be deleted because Vim is always PID 3

Open
#47 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4
Forks
4
Avg merge
1d 5h
Merged PRs (30d)
1

Description

If you open `foo.txt` in Vim, it writes `.foo.txt.swp` alongside it. This file is used for crash recovery (among other things) and is removed when you close the file in Vim, or exit Vim cleanly. The file embeds the PID of the Vim process itself.

When you open a file for which a `.swp` file already exists, Vim reads the PID from the file, and checks whether a Vim with that PID is running. If not, it offers you the option to delete the temporary file; if so, it says "(still running)" and won't let you delete it.

However, the Flatpak is always launched in a new PID namespace, so (in practice) it's always PID 3. After a crash, the new Vim process looks for PID 3 and finds itself.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.