Swap file ".." already exists!

 例:使用vi jetty_stdout.log时 会生成一个 jetty_stdout.log.swp 文件, 然后再开个终端 vi jetty_stdout.log 时会提示:
      【“Swap file "jetty_stdout.log" already exists![O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit:】  

原因:This is the result of not properly closing an open buffer, usually because of a lost ssh connection. If there were unsaved changes, they can be recovered from this swap file.

处理方法: 打开 /etc/vimrc 并添加 set noswapfile 后 OK

=================================================

1、vi是vim的别称,所以直接编译/etc/vimrc即可

  
  
  
  
  1. [admin@inc logs]$ which vi 
  2. alias vi='vim' 
  3.         /usr/bin/vim 

你可能感兴趣的:(vi,职场,休闲)