Interface language

Vim buffers: status(line) symbol

If you use the Vim editor, sooner or later you run into the concept of text buffers.

I wanted a way to report on Vim statusline
that I have more than one modifiable buffer opened, this is particularly
useful when Vim is invoked by some other program (in my case it was
git send-email --compose --annotate')

Inspired from the crazy statuslines from Got
Ravings? I tried a first approach:

set statusline+=%#WarningMsg#%{bufnr('$')>1?'[buffers:'.bufnr('$').']':''}%#StatusLine#

This wasn't exactly what I wanted because bufnr('$')
takes into account also deleted and unlisted buffers, so a very simple
filtering function is needed: