git clone 'git://github.com/algernon/tdd-status-mode-line.git'
This little package implements a mode-line widget to track one's current test-driven development state (FAIL, PASS, or REFACTOR). Fully customisable faces and states and all that. The idea is based on a similar solution for Vim.
Once the package is downloaded, either via a git checkout or simply
tdd-status-mode-line.el file somewhere on your load path,
simply require it and enable one of the two minor modes it provides.
The package is also available from Marmalade and MELPA:
(require 'package) ;; Use one or both of the following two lines (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) (package-initialize) (package-install 'tdd-status-mode-line) (require 'tdd-status-mode-line)
The package defines two minor modes, only one of which should be enabled at a time, and switching between them is not supported. Both of them provide the same key bindings:
C-x t nadvances the state (from none to FAIL, then to PASS and onto REFACTOR, and finally back to FAIL).
C-x t psteps the state back (from PASS to FAIL, etc).
C-x t cclears the state and hides the widget.
The two minor modes are
tdd-status-global-mode, where the first enables the mode for the
current buffer only and will track the TDD state on a per-buffer basis
from that point on; the second enables the mode globally, with global
To use the buffer-local mode of operation, place something like this in your init file:
(require 'tdd-status-mode-line) (add-hook 'prog-mode-hook 'tdd-status-minor-mode)
To enable it globally, use something like the following:
(require 'tdd-status-mode-line) (tdd-status-global-mode)