A cheat sheet for most commonly used keyboard shortcuts while writing clojure code, using my emacs config at https://github.com/cmdrdats/emacs-ext
|
Emacs Key
|
Name
|
OSX
|
|
M
|
Meta
|
Alt - ⌥
|
|
C
|
Control
|
Ctrl
|
|
s
|
Special
|
Command - ⌘
|
|
S
|
Shift
|
Shift
|
|
M-s-arrow
|
Flip buffer in direction of arrow
|
|
s-arrow
|
Jump to window in direction of arrow
|
|
s-S-arrow
|
Resize in direction of arrow
|
|
C-x 3
|
Split window vertically
|
|
C-x 2
|
Split window horizontolly
|
|
C-x 1
|
Unsplit everything
|
|
C-x C-f
|
Open file
|
|
s-k
|
Kill current buffer
|
|
C-x b
|
Switch buffer
|
|
C-x C-b
|
Show buffer list
|
|
s-n
|
Find file in project
|
|
M-%
|
Search and replace in buffer
|
|
C-f
|
Find in buffer
|
|
F6
|
Highlight regex
|
|
M-F6
|
Unhighlight regex
|
|
C-g
|
Cancel current command
|
|
C-M-x
|
Evaluate top level form
|
|
C-x C-e
|
Evaluate preceding form
|
|
C-c C-b
|
Interrupt pending evals
|
|
C-c C-n
|
Eval the ns form
|
|
C-c M-n
|
Switch repl to curent ns
|
|
C-c C-z
|
Switch to REPL buffer
|
|
C-c M-o
|
Clear REPL buffer
|
|
C-c C-k
|
Load current buffer
|
|
C-c C-l
|
Load current file
|
|
M-.
|
Jump to def of current symbol
|
|
M-,
|
Return to pre-jump position
|
|
M-Tab
|
Complete symbol at point
|
|
C-M-Space
|
Select form after cursor, repeat for multiple
|
|
C-Left
|
Pull closing paren one form back
|
|
C-Right
|
Push closing paren one form forward
|
|
C-M-Left
|
Pull opening paren one form back
|
|
C-M-Right
|
Push opening paren one form forward
|
|
ESC-Up
|
Cut to beginning of form and remove parens
|
|
ESC-Down
|
Cut to end of form and remove parens
|
|
M-h
|
Select current top-level form*
|
|
M-i
|
Jump to symbol in current buffer
|
|
cider
|
Open a new nRepl connection
|
|
cider-quit
|
Close nRepl
|
|
ack
|
Regex across your current project
|
|
make-directory
|
Create folder
|
|
dired
|
List and manage folders
|
I've never learned emacs and thought this would help me. But it looks to me, as a beginner, that some things are missing. How do I close a file without saving? How do I exit emacs? How do I save a file? Can I have multiple files open? How do I compile programs? I'm not sure what all could be added to this. I'm not qualified to critique or even suggest. But it just felt like a few more commands might help someone who's trying to learn emacs.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.