There is a fun little journal website called 750words that
encourages writing at 750 words at a time. I think the idea is great,
but I do not want my writing in the cloud. So, I created
It is a little mode that provides a word/line/character count in the modeline. The mode captures the changes in the buffer and present them to you, the user.
Additionally, wc-mode lets you define goals for content and alerts you (via the modeline) when you reach that goal.
To install, grab it from Github or use one of the following commands.
> git clone git://github.com/bnbeckwith/wc-mode.git > git clone http://github.com/bnbeckwith/wc-mode.git
Use the following code to add it to emacs.
;; Supply the path to the mode repository (add-to-list 'load-path "location/of/wc-mode") (require 'wc-mode) ;; (Optionally) setup a global key (global-set-key "\C-cw" 'wc-mode)
When you want to check your added words or set goals, turn on the mode with your global key.
There are two different ways to use this package. First, you can use
it as a minor mode (preferred method). But, if you do not want the
full power of a mode, you can just call the
which will show a message of the current words, lines and characters
in the current buffer.
The rest of this section focuses on the minor-mode usage.
wc-mode, a small set of commands are available via
the following keymap.
||Set word goal|
||Set line goal|
||Set character goal|
||Do a 'wc' on the buffer|
The first three keys set specific goals. The modeline displayed will highlight when upon goal completion. These goals are in relation to the delta of what is already on the page. Because of that, you are free to set a negative goal – useful for text that needs editing.
The final key just runs the
wc-count function to get a message in
The modeline format string,
wc-modeline-format describes how to
display the pieces of data. The following table defines the
|Format Code||What is displayed|
||Original word count (before changes)|
||Original line count|
||Original character count|
||Change in words|
||Change in lines|
||Change in characters|
||Character change goal|
||Line change goal|
||Word change goal|
||Total words in buffer|
||Total lines in buffer|
||Total characters in buffer|
The default setting is "WC[%W%w/%tw]". This displays a "WC[" followed by the original word count, then the change in word count, followed by a slash and the total number of words in the buffer.