例:使用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即可
- [admin@inc logs]$ which vi
- alias vi='vim'
- /usr/bin/vim