I recently added set hidden
to my vimrc
script because I didn't always want to :w
rite a file before :e
diting another file. (With set nohidden
, which is the default, this resulted in a E37: No write since last change (add ! to override)
error).
Setting hidden
solved this problem, but introduced a new one. Sometimes, I split the window (ctrl-w n
) before I :e
dit a file. This creates an empty buffer for each split that I have done. This is of course not what I want.
So, is there some setting or autocommand or anything that I am not aware of that gets rid of unused empty buffers automatically?