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

La​Te​X Word Count

by kevinstadler ST2/ST3

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

Details

Installs

  • Total 27K
  • Win 11K
  • OS X 11K
  • Linux 5K
Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4
Windows 1 1 2 1 4 1 2 4 2 2 6 5 1 1 4 5 3 3 1 0 0 1 1 5 0 4 1 3 0 4 7 3 3 2 2 0 0 5 4 1 2 2 3 4 2 4
OS X 1 3 2 1 5 0 3 3 2 5 2 2 2 4 1 3 8 4 3 1 0 1 0 0 2 3 1 0 1 6 1 3 4 1 0 2 4 2 5 0 1 1 2 1 0 2
Linux 0 0 1 0 1 2 1 2 0 1 1 0 1 2 0 1 3 1 2 1 0 1 1 1 1 2 2 0 2 1 2 2 2 0 1 2 1 0 0 2 0 0 1 1 1 2

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