分页: 1 / 1

最近在使用vi编程时出现了文本名的问题

发表于 : 2009-09-26 22:45
flyer
这几次我经常遇见一种情况,在vi下写了一个程序保存后,再用vi打开这个程序,就出现问题了。如我vi 3.c 写完后再用vi 3.c 这时出现
E325: ATTENTION
Found a swap file by the name ".3.c.swp"
owned by: flyer dated: Sat Sep 26 22:34:25 2009
file name: ~flyer/3.c
modified: YES
user name: flyer host name: ubuntu
process ID: 7956
While opening file "3.c"
dated: Sat Sep 26 22:31:49 2009

(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 3.c"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".3.c.swp"
to avoid this message.

Swap file ".3.c.swp" already exists!
pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
请帮忙解决下如何操作可以不再出现这种问题。谢谢!

Re: 最近在使用vi编程时出现了文本名的问题

发表于 : 2009-09-27 9:16
md5xwl
确记:
编辑完保存然后退出,:wq命令,
如果你只保存然后关闭窗口或切换了,没有用:q退出,就会有swp.文件