Ubuntu cannot read swp file

ask a question: I edited text.txt on ubuntu. After editing, I pressed ctrl+z to exit
. At this time, the .text.txt.swp file was generated

sudo vim -r text.txtswp

.

now I find that this is the case. The reason for the above problem is that I modified ctrl+z exit immediately
if I modify it, it will be normal after a while in ctrl+z.
I wonder if this time difference can be set?

Dec.09,2021

after using sudo vim-r text.txt to display the error in the above image, pressing the R key directly should revert to the previous modification. After the
modification is completed, the wq is saved in edit mode, and then the corresponding .swp file is deleted.

in addition, instead of ending a process, ctrl+z is actually used to suspend a process. You modify half of it, suspend the process, and the .swp file will be generated later.

Menu