Clojure jump to file

Ye He edited this page Jul 16, 2013 · 8 revisions
Clone this wiki locally

clojure-jump-to-file lets you put your cursor on a line that contains a filename/line-number, press a single keystroke, and jump to that line in that file. Also, you can navigate between source and corresponding test files via C-c C-t.

First feature and Second feature

The magic keypress is C-h j.

Because the JVM only tells you the filename of an error - not the path - you have to give Emacs a root of a directory tree to search for matching filenames. The first time you type the magic keypress, you'll be prompted. If you want to change the root thereafter, use M-x midje-root.

To use clojure-jump-to-file, put the contents of the download somewhere where your emacs can find it. Or, if you use el-get, just add midje-mode to your el-get-sources. Then add this to your .emacs file:

 (require 'clojure-jump-to-file)