ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

La​Te​X Word Count

by kevinstadler ALL

SublimeText 2+3 plugin providing a customisable word and character counter for LaTeX and plaintext files

Details

Installs

  • Total 34K
  • Win 15K
  • Mac 14K
  • Linux 6K
Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17
Windows 0 3 9 9 2 5 6 4 8 7 1 1 5 6 1 7 6 2 5 4 6 4 3 6 5 2 7 5 8 17 10 4 7 1 4 5 4 5 14 6 5 15 3 9 11 11
Mac 1 2 2 2 1 0 0 3 2 2 2 2 1 1 4 2 2 1 0 0 3 1 1 3 2 1 0 1 4 2 7 3 2 2 2 0 3 4 3 4 3 6 5 4 2 1
Linux 1 0 1 0 1 1 1 1 1 0 3 1 3 1 0 1 0 2 0 1 0 3 2 1 0 0 2 2 2 0 0 1 0 0 0 2 1 0 2 0 0 1 1 1 2 0

Readme

Source
raw.​githubusercontent.​com

LaTeX Word Count

A Sublime Text word and character count plugin for LaTeX and plaintext files.

Usage

LaTeX Word Count can be installed easily using Sublime Text Package Control.

Go to Tools -> Word Count to display word, character and line counts for the current selection, or for the entire file if nothing is selected.

The default key binding is Control + Shift + C

LaTeX support

The main purpose of this plugin was to support reliable word counts for files with LaTeX markup. The plugin ignores the preamble, abstract, formulas, captions, and supports excluding headers, footnotes and appendices. Have a look at the available config options in Preferences -> Package Settings -> LaTeX Word Count to customise what gets counted.

Suggestions

  • Adding support for other ST-recognised markup languages should be pretty straightforward, have a look here to see how it's done for LaTeX and chip in!
  • A real-time word count displayed in the status bar a la WordCount would be nice and not too hard to implement. If anyone's actually using this plugin and would like this feature just let me know and I'll add it!
  • Sublime Text's scope_name() function could potentially be used to produce more robust stripping of LaTeX commands than the current regexp-wizardry.

License

This plugin combines a simple LaTeX word count python script that I wrote in 2009, the basic plugin structure taken from Naomichi Yamakita's string_counter, as well as changes and fixes submitted by GitHub contributors.

Released under the MIT License