My Emacs settings
This is only a public template for my Emacs settings. The main purpose is to share how I handle all my settings, and packages without crying or making a mess.
To grab all the dependencies:
git clone --recursive git://github.com/gnusosa/.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 the default Emacs provided by both distributions package managers I use the most.
emerge -av emacs
I recommend adding
emacs as a keyword in your system wide
apt-get install emacs
Mac OS X
I use Cocoa Emacs on Mac OS X. It's best installed and handled by homebrew. You can installed like these:
brew install emacs --cocoa
After that you have to copy
Emacs.app from the brew Cellar into
/Applications instead of the symlink that brew places there.
Tips for using these emacs settings
This settings are a modification on magnar's Emacs settings, so shout out to him. You the man dawg.
Original magnar's repository:
git clone --recursive git://github.com/magnars/.emacs.d.git
Therefore, most of the original keybindings still remain.
What differs from magnars repository
I require the correct lisp list paths for Mac OS X and GNU/Linux (soon BSD).
I use system mu4e provided from the OS package manager.
Added ag, calfw, hackernews, haml-mode, org-jira, twit, and znc. All from MELPA.
Unicode for everything. Seriously; if you don't Unicode at everything, GTFO RTFM.
Two extra frames at boot.
If you want to use my settings straight out of the box, here are some things to note:
I recommend starting with a blank emacs + Technomancy's better-defaults package, and then dig through this repo for useful nuggets, instead of forking it directly.
Start by reading up on all the cool stuff in key-bindings.el.
You quit emacs with
C-x r q, mnemonic Really Quit.
Find file in project with
C-x o, in dir with
C-x C-f, recent with
Add your user- and project-specific stuff in .emacs.d/users/[machine name]/*.el
C-his rebound to backspace, like in the shell. Get help on
C-.(autocomplete entire lines with
expand-region is your friend. Find its bound key by doing
F1 f er/expand-region
C-_and redo with
M-_. Watch the undo-tree with
Indent and clean up white space in the entire buffer with
On a mac, the Meta key
Mis bound to Command.
I recommend rebinding Caps Lock to Ctrl and use that instead of the often badly placed Ctrl-key.
C-x C-fOpen a file. Starts in the current directory
C-x fOpen a recently visited file
C-x oOpen a file in the current project (based on .git ++)
C-x C-sSave this file
C-x C-wSave as ...
C-x C-jJump to this files' current directory
C-x bSwitch to another open file (buffer)
C-x C-bList all open files (buffers)
Cut copy and paste
C-spaceStart marking stuff. C-g to cancel.
C-wCut (aka kill)
C-kCut till end of line
C-yPaste (aka yank)
M-vPaste from OS clipboard (aka yank)
<Print>Paste from OS clipboard (aka yank) for
M-yCycle last paste through previous kills
C-x C-yChoose what to paste from previous kills
C-@Mark stuff quickly. Press multiple times
C-gQuit out of whatever mess you've gotten yourself into
M-xRun a command by name
C-x uShow the undo-tree
C-x mOpen magit. It's a magical git interface for emacs
C-arrowMove past words/paragraphs
C-aGo to start of line
C-eGo to end of line
M-g M-gGo to line number
C-x C-iGo to symbol
C-sSearch forward. Press
C-sagain to go further.
C-rSearch backward. Press
C-ragain to go further.
C-x 0Close this window
C-x 1Close other windows
C-x 2Split window horizontally
C-x 3Split window vertically
S-arrowJump to window to the left/right/up/down
F1 tBasic tutorial
F1 kHelp for a keybinding
F1 rEmacs' extensive documentation