• 非正常关闭vim编辑器后提示错误的解决方法


    使用vim,错误出现原因一般为以下两种情况:
    
    (1)    当你用多个程序编辑同一个文件时。
    
    (2)    非常规退出时。
    
    会提示以下信息:
    
    E325: ATTENTION
    Found a swap file by the name".old.txt.swp"
             owned by: root   dated: Tue Mar 2813:27:34 2017
            file name: /tmp/old.txt
             modified: YES
            user name: root   host name:oldboy38
           process ID: 6855
    While opening file "old.txt"
                 dated: Tue Mar 28 13:27:10 2017
     
    (1) Another program may be editing thesame 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 filecrashed.
       If this is the case, use ":recover" or "vim -rold.txt"
       to recover the changes (see ":help recovery").
       If you did this already, delete the swap file ".old.txt.swp"
       to avoid this message.
    Swap file ".old.txt.swp"already exists!
    [O]penRead-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
    (1)(2)为官方给出的解决方法:
    
    (1)    为了避免同一个文件产生两个不同的版本,还是建议选择"(Q)uit"或者继续谨慎修改选择"(E)dit anyway"。
    
    (2)    也可以选择"(R)ecover"或"vim -r filename"恢复到未修改之前,然后再把swp文件删除(这个时候要确保你的swp文件没有用处了)。
    
    最下面选项的意思:
    
    O:  只读,不能改
    
    E:  可以改,从前的修改都丢失
    
    R:  恢复(从前的修改)
    
    D:  删去(删去.swp文件,文件恢复到未修改前)
    
    Q:  退出
    
    A:  放弃
    
     具体解决方案:
    
    (1)    不想保留原先修改的内容直接选D就可以。
    
    (2)    想保留原先修改的内容选R把修改的内容复制出来保存,再退出文件删除awp文件。(awp文件默认为隐藏文件,用ls -a命令查看,用rm命令删除。)
    
    
    
    非正常关闭vim编辑器后提示错误的解决方法
    
    标签:vim 错误
    
    原文:http://hellhappy.blog.51cto.com/12553462/1911083
  • 相关阅读:
    07、从0到1:API测试怎么做?
    06、软件测试工程师的核心竞争力是什么?
    05、如何高效填写软件缺陷报告?
    04、你知道软件开发各阶段都有哪些自动化测试技术吗?
    03、为什么要做自动化测试?什么样的项目适合做自动化测试
    02、如何设计一个"好的"测试用例
    01、你真的懂测试吗?从"用户登录"测试谈起
    2020年03月15号--提升团队工作效率的一些方法
    01月02号总结
    ietester
  • 原文地址:https://www.cnblogs.com/lanliying/p/13581414.html
Copyright © 2020-2023  润新知