|
|
# Emacs Prelude
## Prelude
Emacs is probably the best text editor in the world. However, theprocess of coming up with a useful Emacs configuration is long anddifficult. It's this process that separates you from truly takingadvantage of Emacs's power. I like to refer to this process as the**Prelude**. The **Emacs Prelude** has the goal to ease the initialEmacs setup process and to provide you with a much more powerful andproductive experience than that you get out of the box. By using **EmacsPrelude** you're basically getting a "Get me out of the Prelude, Ijust want to use Emacs" card.
Emacs Prelude is compatible **ONLY with GNU Emacs 24**. While Emacs 24is not yet officially released it's a rock solid piece of softwaremore than suitable for everyday work. There is no good excuse not touse Emacs 24!
Emacs Prelude is not the only reusable Emacs config out there - theEmacs Starter Kit is fairly popular and there is the Emacs Dev Kitthat I used to maintain. I've decided to abandon the Emacs Dev Kit forthe Emacs Prelude for two reasons - the unfortunate choice a name (toosimilar to Emacs Starter Kit) and the totally new philosophy I have instore for the Prelude (easy to update, easy to personalize, easy toextend, highly modular, highly comprehensible).
## Getting Emacs 24
Obviously to use the Emacs Prelude you have to install Emacs 24first. Here's a few tips on doing so:
### OS X
Obtaining Emacs 24 on OS X is really simple. There are two popularways to do it. The first is to simply download a pretest (or a nightlybuild) from [Emacs for OSX](http://emacsformacosx.com). My personalrecommendation would be to get the latest pretest (which is ironicallythe first pretest as well) from[here](http://emacsformacosx.com/emacs-builds/Emacs-pretest-24.0.90-universal-10.6.7.dmg).
That was really easy, right?
The second easy way to obtain Emacs 24 is via[homebrew](http://mxcl.github.com/homebrew/). Just type the followingincantation in your shell and you're done:
```$ brew install emacs --cocoa --use-git-head --HEAD$ cp -r /usr/local/Cellar/emacs/HEAD/Emacs.app /Applications/```
The second step is optional, but it's recommended if you like to startEmacs from the launchpad or from Spotlight. Personally I prefer tostart Emacs in daemon mode (`emacs --daemon`), so that I could share asingle Emacs instance between several Emacs clients (`emacsclient-c/t`).
That's all folk! You may now proceed to the configuration section.
### Linux
Given that Linux is more or less the home os of Emacs it presents uswith the most installation options. Of course, we can build Emacs from[source](https://github.com/emacsmirror/emacs) on every distributionout there, but I rarely bother to do so. Using the distribution'spackage manager is a better idea for many reasons - you don't need toinstall a build chain and lots of dev libraries, you get updatedversions when they are released and you get automated dependencymanager, just to name a few.
That said, few distributions include in their primary repositoriesbuilds of Emacs 24. Luckily there are some unofficial repos that cometo the rescue.
Debian/Ubuntu users should look no further than the amazing[emacs-snapshot APT repo](http://emacs.naquadah.org/). You'll findinstallation instructions there for all the relevant Debian and Ubuntuversions out there. High quality, highly recommended builds!
Gentoo users have even less to do, since Emacs 24 can be obtained viathe emacs-vcs package in portage, as noted in the official[Emacs on Gentoo page](http://www.gentoo.org/proj/en/lisp/emacs/emacs.xml).
Unfortunately I wasn't able to find prebuilt Emacs 24 packages for anyof the RPM distros (Fedora, SUSE, Mandriva, etc). Since, I'm Debianuser I have to admit that I didn't look that far, but the sourceinstallation is not particularly hard and is always an option.
### Windows
There are several ways to obtain precompiled Emacs 24 binaries ifyou're a Windows users. The most popular are[EmacsW32](http://ourcomments.org/cgi-bin/emacsw32-dl-latest.pl),[Emacs for Windows](http://code.google.com/p/emacs-for-windows/) andof course the official[Emacs Windows builds](http://alpha.gnu.org/gnu/emacs/windows/). I've,personally, never used any builds other than the official ones. Theunofficial builds usually include installers and various patches thatmight be of use to some users.
Since I rarely use Windows I cannot give you any more advice on thechoice of a binary vendor.
## Enhanced programming experience
The following list will be expanded greatly in the future.
### Additional programming languages support
* Clojure* CoffeeScript* Groovy* Haskell
### Additional markup languages support
* Markdown* Sass* Haml* Yaml* LaTeX
### Enhanced configuration
* C* Clojure* CoffeeScript* Common Lisp* ERC* JavaScript* Python* Ruby* Scheme* XML
## Enhanced productivity
* Projectile* yasnippet
## Bundled packages
* auctex (LaTeX editing)* clojure-mode* coffee-mode* deft (note taking)* gist (snippet sharing on github.com)* groovy-mode* haml-mode* haskell-mode* magit (enhanced git integration)* markdown-mode* paredit* projectile (project management mode)* python.el (improved Python mode)* sass-mode* scss-mode* yaml-mode* yari (ri frontend)* yasnippet
## Installation
```bash$ git clone git://github.com/bbatsov/emacs-prelude.git path/to/local/repo$ ln -s path/to/local/repo ~/.emacs.d```
You'd do well to replace `~/.emacs.d` with the value of`user-emacs-directory` for your OS. You can check the value by doing`C-h v user-emacs-directory` inside Emacs.
You might have to install the `make` and `makeinfo` packages if youdon't have them already, since the build of some packages obtained via`el-get` might require them.
## Running
Nothing fancy here. Just start Emacs as usual. Personally I run Emacsin daemon mode:
`$ emacs --daemon`
Afterwards I connect to the server with either a terminal or a GUIclient like this:
```bash$ emacsclient -t$ emacsclient -c```
## Color Themes
Emacs 24 ships with a new theming facility that effectively rendersthe old color-theme package obsolete. Emacs 24 provides a dozen ofbuilt-in themes you can use out-of-the-box by invoking the `M-xload-theme` command. Emacs Prelude adds two more popular themes to themix - zenburn and solarized (I'm the maintainer of the Emacs portsincluded).
Zenburn is the default color theme in Prelude, but you can change itat your discretion. Why Zenburn? I (and lots of hackers around theworld) find it pretty neat for some reason. Personally I find thedefault theme pretty tiresome for the eyes, that's why I took that"controversial" decision to replace it. You can, of course, easily goback to the default (or select another theme entirely).
## Personalizing
If you'd like to change some of the setting in Prelude (or simply addmore) the proper way to do so would be to create Emacs Lisp filesunder the **personal** directory in `prelude-dir`. They will be loadedautomatically be Prelude on startup.
Avoid modifying the Prelude config itself - this will make it hard foryou to receive automatic updates in the future.
## Caveats & Pitfalls
### No arrow navigation in editor buffers
This is not a bug - it's a feature! I firmly believe that the one trueway to use Emacs is by using it the way it was intended to be used (asfar as navigation is concerned at least). That's why I've disabled allmovement commands with arrows - to prevent you from being tempted touse them.
If you'd still like to use the arrow keys just invoke `M-xprelude-restore-arrow-keys` to enable them for the duration of yourcurrent Emacs session or add `(prelude-restore-arrow-keys)` to yourpersonal Emacs customization to enable them permanently.
### Windows compatibility
While everything in Prelude should work fine in Windows I test it onlywith Linux & OSX so there are Windows related problems from time totime. This situation will probably improve over time.
## Known issues
Check out the project's issue list for that. :-)
## Bugs & Improvements
Bug reports and suggestions for improvements are alwayswelcome. github pull requests are even better! :-)
I'd like to include a nice variety of Emacs 24 themes into Prelude -so if you've developed (or simply found) one - give me a shout andI'll take a look at it.
Cheers,Bozhidar
|