没有删除选项可以删除.bash_profile.swp

har*_*tej 1 vim

我正在编辑.bash_profile文件,然后不小心关闭了bash控制台。从那时起,每当我尝试使用vim打开.bash_profile时,都会收到E325:注意错误。

我遇到了一个与此类似的问题,有一个答案,据说可以在给出的选项中选择(D)elete。但我看不到这种选择。

While opening file "/Users/hareentej22/.bash_profile"
             dated: Fri May 18 02:20:07 2018

(1) Another program may be editing the same file.  If this is the case,
    be careful not to end up with two different instances of the same
    file when making changes.  Quit, or continue with caution.
(2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r /Users/hareentej22/.bash_prof
ile"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/Users/hareentej22/.bash_prof
ile.swp"
    to avoid this message.

Swap file "~/.bash_profile.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort: 
Run Code Online (Sandbox Code Playgroud)

还有其他解决方法吗?

dlm*_*tei 6

删除选项显示在较新版本的vim中,但即使是较新版本,有时也不会显示该选项。我不知道它在什么条件下显示。

我认为这\rm ~/.bash_profile.swp是最好的方法