Pages

Saturday, 13 July 2013

Linux - emacs cheat sheet

Basic emacs

C denotes the Ctrl key, so C-x means press Ctrl and x together. M denotes the Alt key in the same way.

Launch emacs:
emacs -nw -Q

Display interactive tutorial:
M-x help-with-tutorial

Full reference card can be found here.

Emacs and the node.JS REPL

Launch emacs:
emacs -nw file.js

C-x 3           Split the window vertically
C-c !            Launch node.js REPL within emacs
M-o             Toggle to the other window
C-c C-j        Send current line of code to REPL and execute it
C-c C-r        Send the marked region of code to REPL and execute it (see reference card for how to mark)

No comments:

Post a Comment