Tools for Clojure

Table of Contents

1 Emacs

It is called cider

First, `lein new hello-world` to create a hello-world project.

Navigate emacs to one of the files or the directory inside the project and call `cider-jack-in`.

1.1 Eval

  • cider-eval-last-sexp (C-x C-e)
  • cider-eval-defun-at-point (C-M-x)
  • cider-interrupt: interrupt pending evaluation
  • cider-macroexpand-1 (C-c C-m)
  • cider-load-buffer
  • cider-refresh: reload all modified files
  • cider-inspect (C-c M-i)

1.2 Navigation

  • cider-switch-to-repl-buffer (C-c C-z)
  • cider-quit

1.3 Doc

  • cider-doc (C-c C-d C-d)
  • cider-javadoc (C-c C-d C-j): display in browser

1.4 Tests

  • cider-test-run-test: run test at point
  • cider-test-rerun-test: rerun the last test
  • cider-test-run-project-tests
  • cider-test-rerun-failed-tests
  • cider-test-show-report

2 Lein

lein new hello-world
cd hello-world
lein deps # install deps
lein repl # start repl

Author: Hebi Li

Created: 2017-12-07 Thu 15:13

Validate