sponsor Vim development Vim logo Vim Book Ad

wc.vim : Manuscript word counter - Strunk & White style

 script karma  Rating 49/18, Downloaded by 1373  Comments, bugs, improvements  Vim wiki

created by
script type
Provides word count for manuscripts (essay or story documents), compliant with standard author rules (such as Strunk & White style lexicon for English grammar).

Standard word count utilities (like unix 'wc') do not provide an accurate count because they count breaks between words.  In fiction writing, some sentences--like this one--have more words than breaks between words..

To use, install and type :WC

Line ranges are supported.

To count the lines of a particular section of a document, insert a new line with 8 dashes, and the count will stop at that line.
Like that.

The word count also ignores the common author mark for section breaks using asterisk as shown below.

* * *

This script is based on the sed 'wc' example provided in the GNU info pages; the algorithm replaces each whitespace seperated word by a single character and then counts the length of the string.

install details
Copy to vim plugin directory.
Use with :WC command.


rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
wc.vim 1.0 2005-01-28 6.0 jcline Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
Vim at Github