Git Product home page Git Product logo

clojure-cheatsheet's Introduction

This repository is now deprecated, as the functionality was moved upstream to CIDER and helm-cider.

Clojure Cheatsheet for Emacs

The incredibly handy Clojure Cheatsheet, updated for Clojure 1.7.0 and packaged into an easy, fast, searchable, offline form:

screenshot1.png

Status

Ready to use. Based on Clojure 1.7.0.

Installation

If you’re hooked up to MELPA:

M-x package-refresh-contents
M-x package-install RET clojure-cheatsheet

Alternatively just grab the single clojure-cheatsheet.el file and install that in your preferred way.

Keybindings

The cheatsheet doesn’t ship with keybindings - people tend to have strong opinions on them. As a reminder, here’s how to define custom clojure-mode keybindings in your own .emacs config:

Regular Emacs

(eval-after-load 'clojure-mode
  '(progn
     (define-key clojure-mode-map (kbd "C-c C-h") #'clojure-cheatsheet)))

Evil Users

(evil-define-key 'normal
  clojure-mode-map "H" 'clojure-cheatsheet)

Basic Usage

Call M-x clojure-cheatsheet and the cheatsheet will appear. Type in some terms (space separated) to narrow down the list. For example, try typing in sort map to see some functions that deal with sorting maps.

Keys

C-nNext item.
C-pPrevious item.
C-oNext section.
RETJump to the Clojure docs for the current selection.
C-zJump to the Clojure docs for the current selection without closing the cheatsheet.
C-eJump to the Clojure src for the current selection.
C-h mFull list of keyboard shortcuts.

Advanced Usage

This package stands on top of Helm. The variable helm-source-clojure-cheatsheet is available if you want to mix it in as a Helm source.

See Also

If you like this, and you like org-mode, then you’ll probably like helm-orgcard too…

Building

The constant clojure-cheatsheet-hierarchy defines the contents of the cheatsheet. See the docstring of that constant for a full description of the format.

There is a test suite in clojure-cheatsheet-tests.el that checks that every symbol defined in the cheatsheet is valid, and that every symbol defined by Clojure is in the sheet (with a few explicit exceptions).

To run the test suite:

  • Clone the project.
  • Open clojure-cheatsheet-tests.el.
  • Call M-x eval-buffer.
  • Call M-x cider-jack-in to start a Clojure REPL.
  • Call M-x ert <RET> to run the test suite.
  • Optional: Marvel at Emacs’ support for test suites.

clojure-cheatsheet's People

Contributors

bbatsov avatar brunchboy avatar dgtized avatar extraordinaire avatar johnmastro avatar krisajenkins avatar purcell avatar syohex avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.