@FDinoff建议检查vim帮助。如果有人想更轻松地查看这些内容:
WHAT TO DO? *swap-exists-choices*
If dialogs are supported you will be asked to select one of five choices:
Swap file ".main.c.swp" already exists! ~
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort, (D)elete it: ~
O Open the file readonly. Use this when you just want to view the file and
don't need to recover it. You might want to use this when you know someone
else is editing the file, but you just want to look in it and not make
changes.
E Edit the file anyway. Use this with caution! If the file is being edited
in another Vim, you might end up with two versions of the file. Vim will
try to warn you when this happens, but better be safe then sorry.
R Recover the file from the swap file. Use this if you know that the swap
file contains changes that you want to recover.
Q Quit. This avoids starting to edit the file. Use this if there is another
Vim editing the same file.
When you just started Vim, this will exit Vim. When starting Vim with
files in several windows, Vim quits only if there is a swap file for the
first one. When using an edit command, the file will not be loaded and you
are taken back to the previously edited file.
A Abort. Like Quit, but also abort further commands. This is useful when
loading a script that edits several files, such as a session with multiple
windows.
D Delete the swap file. Use this when you are sure you no longer need it.
For example, when it doesn't contain changes, or when the file itself is
newer than the swap file.
On Unix this choice is only offered when the process that created the
swap file does not appear to be running.
据我所知,abort是您使用vim检查多个文件时的原因,例如:
vim file1.txt file2.txt
如果第一个被锁定并且您调用quit,它将进入file2.txt,而中止将完全退出应用程序。
:help swap-exists-choices
回答您的问题吗?