Instant Cheatsheet instantly creates a cheatsheet for your project and its dependecies.
- Add
lein-instant-cheatsheet
to your Leiningen:plugins
- Start the webserver with
lein instant-cheatsheet
Instant Cheatsheet spins up a Ring server at localhost:13370
and automatically reloads documentation whenever a Clojure file in your project changes.
Instant Cheatsheet has a few features that might just make it your go-to Clojure reference:
Instant Cheatsheet has a built-in filter bar at the top to search for matching symbols. A list of matching symbols and their namespaces appears on the left side of the screen; documentation for those symbols appear on the right.
You can also see documentation in a tooltip by hovering over symbols on the left, and you can see source code (if available) by hovering over the source
links on the right.
You can also search for examples from ClojureDocs by clicking the examples
link.
Instant Cheatsheet will automatically use the GET parameter q
as an initial value for the filter bar.
That means a request like http://localhost:13370/#?q=print
will automatically search for symbols containing print
.
Like Marginalia, Instant Cheatsheet parses docstrs as Markdown. Add examples, links, and more to your documentation!
You can create an Emacs function to search Instant Cheatsheet, and even bind it to a keyboard shortcut:
(defun instant-cheatsheet-search (search-term)
"Opens Instant Cheatsheet in a new browser tab and searches for SEARCH-TERM."
(interactive "sSearch Instant Cheatsheet for: ")
(browse-url
(concat "http://localhost:13370/#?q="
(url-hexify-string search-term))))
(define-key clojure-mode-map (kbd "<f12> i") #'instant-cheatsheet-search)
(define-key cider-repl-mode-map (kbd "<f12> i") #'instant-cheatsheet-search)
Hitting <f12> i
will prompt you for a search term and open a new browser tab with that term as the initial filter text.
2.1.4
(April 14th, 2015)2.1.3
(April 1st, 2015)- Fix issue where instant-cheatsheet would fail to launch
in projects that did not have a
:main
class defined
- Fix issue where instant-cheatsheet would fail to launch
in projects that did not have a
2.1.1
(March 31st, 2015)- Fix overflowing left-hand symbols list
- Add custom source reader that works in cases
clojure.repl/source-fn
does not - Strip docstrings from source
2.1.0
(March 30th, 2015)- Automatically reload documentation from files that have changed since last API call
2.0.0
(March 13th, 2015)- Rewrite instant-cheatsheet as a Leiningen plugin
1.5.0
(Feb 4th, 2015)- Rework Instant Clojure Cheatsheet to use Angular instead of jQuery
1.0.0
(April 5th, 2013)- Initial release of standalone, static Instant Clojure Cheatsheet
Instant Cheatsheet is inspired by other excellent Clojure cheatsheets like this one.
Instant Cheatsheet was built with Hiccup, Bootstrap, and AngularJS.