2020/06/11

  1. 看 [CMD101],進度到 vim 章節的心得。
    跟大家分享一下,因為我用 command line 很習慣用 ctrl + z 跳回去,而當我 vim 一個檔案時,假設我 vim hello.txt 後,該檔案會自動產生一個檔案叫做 hello.swp,照我爬文的內容指出這個 .swp 檔算是備份的角色,如果你原本檔案遺失或是毀損可以透過這個檔案復原,而當 vim 的視窗「正常」結束時,系統會自動把 .swp 檔案自動刪除,但假設假設!如果今天 vim hello.txt 到 vim 的畫面時,按下 ctrl + z,系統會判定「不是正常結束」,因此 .swp 檔案不會消失,而當你再次 vim hello.txt 時,就會出現以下 J 個畫面:
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    而且之後每次 vim 這個檔案時,都會跳出這視窗,解決辦法就是剛好可以練習一下 rm 的指令:
rm .hello.txt.swp

接著再 vim 一次應該就正常了。

Select a repo