My .vimrc
contains
set hidden
set shortmess=fotx
I start Vim 7.3 with
vim a b
I modify a
(optional), then I save it and switch to the next file with :wn
. Then I use :prev
to return to the previous file. I modify the file some more (optional) and again run :wn
.
The first time I ran :wn
, I switched instantly to the next buffer, thanks to shortmess=o
. But the second time, I had a two-line prompt and needed to press Enter:
"a" 1854 lines, 56709 characters written
"b" 1854 lines --0%-- (2 of 2)
Press ENTER or type command to continue
There's something going on that I don't understand with the hidden
option. When I start Vim, the status line shows
"a" 1854 lines, 56709 characters 1,1 Top
I get a similar line after switching to b
. But after switching back to a
with :prev
, the status line is different:
"a" 1854 lines --0%-- (1 of 2) 1,1 Top
If I remove the hidden
option, I never see the --0%--
form of the status line, and the shortmess=o
option has the desired effect of not requiring a confirmation after :wn
. But I do want set hidden
, because I want to be able to switch buffers without saving.
Why is set hidden
changing the format of the status line? More importantly, why is it causing me to have to acknowledge a :wn
by pressing Enter the second time, in spite of set shortmess=fotx
still being on? How do I get the benefits of both hidden
and shortmess=o
?