The vim commands buflisted(0) and bufexists(0) return true if I have single file open.
I don't understand this because the output of ls shows that file as buffer 1 (and buflisted(1) and bufexists(1) also returns true). And if I try any buffer operation on buffer 0 I get the error message Zero count.
This seems like a special buffer but I can't find any information that tells me what buffer 0 is used for. Can anybody help?
Thanks!
That 0 is explained in :help bufname(). It's the "alternate buffer" of the current buffer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With