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 40K
  • Win 18K
  • Mac 16K
  • Linux 7K
Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 29 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13
Windows 1 3 3 3 0 4 7 1 6 4 4 5 4 4 8 6 7 5 5 1 4 3 0 2 3 6 3 1 3 0 2 1 4 4 6 3 5 4 3 9 4 2 0 3 7 2
Mac 0 1 1 4 1 1 2 3 3 4 4 1 0 0 1 4 0 0 2 1 1 1 2 1 2 2 1 0 0 2 4 2 3 1 1 2 3 3 0 4 1 3 3 2 0 5
Linux 0 1 0 0 1 2 1 1 5 4 0 0 1 1 1 0 1 1 0 0 0 1 1 0 4 1 0 0 2 2 0 0 1 0 1 1 1 2 2 0 0 0 0 1 0 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