Vim allows you to customize your definition of what counts as a 'word'. Set statusline +=\ w:%, set laststatus = 2 ' show the statusline
You can edit your vimrc file so the word count is always visible in the status line. To get a live word count to show up in the vim status bar is a little tricky, The above writes the current buffer to the standard input of the external wc program.
An alternative (which does not require saving the buffer to a file), is to use the command: The initial :w writes the current file so that the external program can read it. For example, in Unix you could do the following to get the word count of the entire file: If you prefer, you can call an external program using the '%' file name expansion. Selected 6 of 358 Lines 37 of 2281 Words 186 of 13426 Bytes To count the number of words in a block, select the block (for example, type V5j to select 6 lines) and again press g then Ctrl-g. To count the number of words in the current buffer, press g then Ctrl-g.