This is a card in Dave's Virtual Box of Cards.

Vim Word Count! (type g CTRL-g)

Created: 2023-01-29

To get a word (and line and character) count in Vim without any external tools, just type g C-g.

That is, type g followed by CTRL-g.

Example as I type on this page right now:

Col 1 of 0; Line 13 of 13; Word 46 of 46; Byte 262 of 262

Note that this also gives you the current positiion of the cursor in the file. Extremely handy. I’d always used wc as an external command (:!wc %) for this before.