An ever-changing set of Emacs settings.
To grab all the dependencies:
git clone --recursive git://github.com/jsulak/.emacs.d.git
The first time you start Emacs, it will install some additional packages that are best handled by the package manager.
I use Emacs For Mac OS X.
If you want to use my settings straight out of the box, here are some things to note:
-
Read Steve Yegge's Effective Emacs.
-
Start by reading up on all the cool stuff in james-bindings.el.
-
Add your machine-specific stuff in ~/.emacs.d/custom.el.
-
C-h
is rebound to backspace, like in the shell. Get help onF1
instead. -
expand-region is your friend. Find its bound key by doing
C-h f er/expand-region
-
Undo with
C-z
orC-_
and redo withM-_
. Watch the undo-tree withC-x u
-
I recommend rebinding Caps Lock to Ctrl and use that instead of the often badly placed Ctrl-key.
-
Watch emacsrocks.com.
When you start using Emacs for the first time, your habits fight you every inch of the way. Your fingers long for the good old familiar key bindings. Here's an overview of the most commonly used shortcuts to get you through this pain:
C
Shorthand for the ctrl-keyM
Shorthand for the meta-key (alt-key)S
Shorthand for the shift-key
C-x C-f
Open a file. Starts in the current directoryC-x C-s
Save this fileC-x C-w
Save as ...C-x b
Switch to another open file (buffer)C-x C-b
Switch to another open file in a new windowF5
Revert buffer
C-space
Start marking stuff. C-g to cancel.C-x C-k
Cut (aka kill) (kills entire line if no selection)C-k
Cut till end of lineC-w
Kill word forwardC-q
Kill word backwardM-w
Copy (copies entire line if no selection)C-y
Paste (aka yank)M-y
Cycle last paste through previous killsC-x C-y
Choose what to paste from previous kills XXXC-'
Mark stuff quickly. Press multiple times
C-g
Quit out of whatever mess you've gotten yourself intoM-x
orC-x C-m
Run a command by nameC-z
UndoM-_
RedoC-x u
Show the undo-treeC-c o
Occur-mode - show all occurrences of string in file.C-x m
Open magit. It's a magical git interface for Emacs
C-arrow
Move past words/paragraphsC-a
Go to indentation, then start of lineC-e
Go to end of lineC-c C-g
Go to line numberM-.
Go to tagC-.
Jump back from tagC-s
Search forward. PressC-s
again to go further.C-r
Search backward. PressC-r
again to go further.
C-x 0
Close this windowC-x 1
Close other windowsC-x 2
Split window horizontallyC-x 3
Split window verticallyS-arrow
Jump to window to the left/right/up/down
C-h t
Basic tutorialC-h k
Help for a key bindingC-h r
Emacs' extensive documentation
Almost everything in my Emacs config was borrowed (stolen) from someone else's. Exploring other people's configs are one of the best ways to learn about how Emacs works. Some good sources:
- Magnar's .emacs.d (much of this text is borrowed from here)
- milkypostman's dotemacs
- purcell's emacs.d
- Emacs Starter Kit