/amidoneyet.vim

Vim script for counting pages written in latex, based on word count.

Primary LanguageVim Script

Am I Done Yet?

Are you writing your thesis, a book, or something else using LaTeX and vim? And do you sometimes wonder how many pages you've managed to bang out so far? I often do, so I wrote this little script.

Dependencies

In short:

  • Tested with Vim v. 7.4, but older versions should work as well.
  • The "detex" tool. It's available in MacPorts for OSX, and likely also in your favorite package manager on Linux.
  • To ease installation, Vundle, Pathogen, vim-plug

Due to the requirements, Am I Done Yet is probably only compatible with Unix-like systems.

Installation

Pathogen

$ cd ~/.vim
$ git clone https://github.com/DonnoDK/amidoneyet.vim bundle/amidoneyet.vim

Vundle / vim-plug

If you are using something like Vundle or vim-plug, you are probably familiar with how installing plugins work. Add the following to your vimrc:

Plugin 'DonnoDK/amidoneyet.vim'

Usage

Open a .tex file and run the command :CountPages. If you want, you can map the command to something like cp. You can either run the command on a particular .tex file to get page count for that file (and any included .tex files), or run it on your main .tex to get the total page count for your entire project.