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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.