:vi filename 会关闭当前正在编辑的文件,打开filename,此时整个vi只打开了一个文件,:q当然就退出了 如果你想同时打开两个文件 用多标签 :tab new filename 或者 多窗口:new filename
:bdelete 或者:bd