Mac下vi ~/.bash_profile 报错 E325: ATTENTION Found a swap file by the name ".bash_profile.swp"

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/chi1130/article/details/82728329

当你 输入source ~/.bash_profile设置立即生效时候会报这个错误

这个是没有关系:

  • 这是由于在编辑该文件的时候异常退出了,因为vim在编辑文件时会创建一个交换文件swap file以保证文件的安全性。

解决办法:

  • 输入 q(退出)
  • 然后在终端出入:rm -f ~/.bash_profile.swp
  • 最后你在终端输入 source ~/.bash_profile就可以了

猜你喜欢

转载自blog.csdn.net/chi1130/article/details/82728329