Skip to content

Instantly share code, notes, and snippets.

@jrusev
Last active January 19, 2016 14:05
Show Gist options
  • Save jrusev/dfb322ce3f19ba9b8892 to your computer and use it in GitHub Desktop.
Save jrusev/dfb322ce3f19ba9b8892 to your computer and use it in GitHub Desktop.
Useful commands for working with Clojure in Emacs

Emacs

Command Description
C-x b Switch buffer.
C-/ Undo.
C-S Search forward.
M-x rgrep Search in files.
Shift-→ Move point from window to window using Shift and the arrow keys (like C-x o).

Cider

Command Description
C-c M-n Switch the namespace of the REPL buffer to the namespace of the current buffer.
C-c C-e Evaluate the form preceding point and display the result in the echo area. If invoked with a prefix argument, insert the result into the current buffer.
C-c M-o Clear the entire REPL buffer, leaving only a prompt. Useful if you're running the REPL buffer in a side by side buffer.
C-c C-k Load (eval) the current buffer.

Projectile

Command Description
C-c p f Display a list of all files in the project. With a prefix argument it will clear the cache first.
C-c p d Display a list of all directories in the project. With a prefix argument it will clear the cache first.

expand-region

Command Description
C-= Increases the selected region by semantic units. Just keep pressing the key until it selects what you want.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment