Unsaved buffer warning when switching files/buffers

ぃ、小莉子 提交于 2019-11-28 20:52:11

问题


I am using FuzzyFinder with Vim to open files and switch between buffers. It works like a charm except when the current file I am working on has some changes. Vim wouldn't let me switch the buffer till I save it:

"E37: No write since last change (add ! to override)".

Is there a way of suppressing this warning unless I am quitting the editor? All I want to do it switch to a different buffer for referencing some code and switch back.


回答1:


I think you can use :set hidden.




回答2:


Use the :set hidden option and Vim will hide the buffer until you come back to it.

You can also use :set confirm to deal with the unsaved buffer warning more conveniently.



来源:https://stackoverflow.com/questions/2414626/unsaved-buffer-warning-when-switching-files-buffers

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!