Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

210 lines
6.9 KiB

  1. # Emacs Prelude
  2. ## Prelude
  3. Emacs is probably the best text editor in the world. However, the
  4. process of coming up with a useful Emacs configuration is long and
  5. difficult. It's this process that separates you from truly taking
  6. advantage of Emacs's power. I like to refer to this process as the
  7. **Prelude**. The **Emacs Prelude** has the goal to ease the initial
  8. Emacs setup process and to provide you with a much more powerful and
  9. productive experience than that you get out of the box. By using **Emacs
  10. Prelude** you're basically getting a "Get me out of the Prelude, I
  11. just want to use Emacs" card.
  12. Emacs Prelude is compatible **ONLY with GNU Emacs 24**. While Emacs 24
  13. is not yet officially released it's a rock solid piece of software
  14. more than suitable for everyday work. There is no good excuse not to
  15. use Emacs 24!
  16. Emacs Prelude is not the only reusable Emacs config out there - the
  17. Emacs Starter Kit is fairly popular and there is the Emacs Dev Kit
  18. that I used to maintain. I've decided to abandon the Emacs Dev Kit for
  19. the Emacs Prelude for two reasons - the unfortunate choice a name (too
  20. similar to Emacs Starter Kit) and the totally new philosophy I have in
  21. store for the Prelude (easy to update, easy to personalize, easy to
  22. extend, highly modular, highly comprehensible).
  23. ## Getting Emacs 24
  24. Obviously to use the Emacs Prelude you have to install Emacs 24
  25. first. Here's a few tips on doing so:
  26. ### OS X
  27. Obtaining Emacs 24 on OS X is really simple. There are two popular
  28. ways to do it. The first is to simply download a pretest (or a nightly
  29. build) from [Emacs for OSX](http://emacsformacosx.com). My personal
  30. recommendation would be to get the latest pretest (which is ironically
  31. the first pretest as well) from
  32. [here](http://emacsformacosx.com/emacs-builds/Emacs-pretest-24.0.90-universal-10.6.7.dmg).
  33. That was really easy, right?
  34. The second easy way to obtain Emacs 24 is via
  35. [homebrew](http://mxcl.github.com/homebrew/). Just type the following
  36. incantation in your shell and you're done:
  37. ```
  38. $ brew install emacs --cocoa --use-git-head --HEAD
  39. $ cp -r /usr/local/Cellar/emacs/HEAD/Emacs.app /Applications/
  40. ```
  41. The second step is optional, but it's recommended if you like to start
  42. Emacs from the launchpad or from Spotlight. Personally I prefer to
  43. start Emacs in daemon mode (emacs --daemon), so that I could share a
  44. single Emacs instance between several Emacs clients (emacsclient
  45. -c/t).
  46. That's all folk! You may now proceed to the configuration section.
  47. ### Linux
  48. Given that Linux is more or less the home os of Emacs it presents us
  49. with the most installation options. Of course, we can build Emacs from
  50. [source](https://github.com/emacsmirror/emacs) on every distribution
  51. out there, but I rarely bother to do so. Using the distribution's
  52. package manager is a better idea for many reasons - you don't need to
  53. install a build chain and lots of dev libraries, you get updated
  54. versions when they are released and you get automated dependency
  55. manager, just to name a few.
  56. That said, few distributions include in their primary repositories
  57. builds of Emacs 24. Luckily there are some unofficial repos that come
  58. to the rescue.
  59. Debian/Ubuntu users should look no further than the amazing
  60. [emacs-snapshot APT repo](http://emacs.naquadah.org/). You'll find
  61. installation instructions there for all the relevant Debian and Ubuntu
  62. versions out there. High quality, highly recommended builds!
  63. Gentoo users have even less to do, since Emacs 24 can be obtained via
  64. the emacs-vcs package in portage, as noted in the official
  65. [Emacs on Gentoo page](http://www.gentoo.org/proj/en/lisp/emacs/emacs.xml).
  66. Unfortunately I wasn't able to find prebuilt Emacs 24 packages for any
  67. of the RPM distros (Fedora, SUSE, Mandriva, etc). Since, I'm Debian
  68. user I have to admit that I didn't look that far, but the source
  69. installation is not particularly hard and is always an option.
  70. ### Windows
  71. There are several ways to obtain precompiled Emacs 24 binaries if
  72. you're a Windows users. The most popular are
  73. [EmacsW32](http://ourcomments.org/cgi-bin/emacsw32-dl-latest.pl),
  74. [Emacs for Windows](http://code.google.com/p/emacs-for-windows/) and
  75. of course the official
  76. [Emacs Windows builds](http://alpha.gnu.org/gnu/emacs/windows/). I've
  77. ,personally, never used any builds other than the official ones. The
  78. unofficial builds usually include installers and various patches that
  79. might be of use to some users.
  80. Since I rarely use Windows I cannot give you any more advice on the
  81. choice of a binary vendor.
  82. ## Enhanced programming experience
  83. The following list will be expanded greatly in the future.
  84. ### Additional programming languages support
  85. * Clojure
  86. * CoffeeScript
  87. * Haskell
  88. ### Additional markup languages support
  89. * Markdown
  90. * Sass
  91. * Haml
  92. * Yaml
  93. * LaTeX
  94. ### Enhanced configuration
  95. * C
  96. * Common Lisp
  97. * Ruby
  98. * Scheme
  99. ## Enhanced productivity
  100. ## Bundled packages
  101. * auctex (LaTeX editing)
  102. * clojure-mode
  103. * coffee-mode
  104. * deft (note taking)
  105. * gist (snippet sharing on github.com)
  106. * haml-mode
  107. * haskell-mode
  108. * magit (enhanced git integration)
  109. * markdown-mode
  110. * paredit
  111. * projectile (project management mode)
  112. * sass-mode
  113. * scss-mode
  114. * yaml-mode
  115. * yari (ri frontend)
  116. * yasnippet
  117. ## Installation
  118. git clone git://github.com/bbatsov/emacs-prelude.git path/to/local/repo
  119. ln -s path/to/local/repo ~/.emacs.d
  120. ## Running
  121. Nothing fancy here. Just start Emacs as usual. Personally I run Emacs
  122. in daemon mode:
  123. `emacs --daemon`
  124. Afterwards I connect to the server with either a terminal or a GUI
  125. client like this:
  126. emacsclient -t
  127. emacsclient -c
  128. ## Personalizing
  129. If you'd like to change some of the setting in Prelude (or simply add
  130. more) the proper way to do so would be to create Emacs Lisp files
  131. under the **personal** directory in ~/.emacs.d. They will be loaded
  132. automatically be Prelude on startup.
  133. Avoid modifying the Prelude config itself - this will make it hard for
  134. you to receive automatic updates in the future.
  135. ## Caveats & Pitfall
  136. ### No arrow navigation in editor buffers
  137. This is not a bug - it's a feature! I firmly believe that the one true
  138. way to use Emacs is by using it the way it was intended to be used (as
  139. far as navigation is concerned at least). That's why I've disabled all
  140. movement commands with arrows - to prevent you from being tempted to
  141. use them.
  142. ### What is this terrible default theme?
  143. It's called Zenburn and I (and lots of hackers around) the world find it
  144. pretty neat (I also happen to be the maintainer of its Emacs port). I
  145. find the default theme pretty tiresome for the eyes, that's why I took
  146. that "controversial" decision to replace it. You can, of course,
  147. easily go back to the default (or select another theme entirely).
  148. ## Known issues
  149. None so far.
  150. ## Bugs & Improvements
  151. Bug reports and suggestions for improvements are always
  152. welcome. github pull requests are even better! ;-)
  153. I'd like to include a nice variety of Emacs 24 themes into Prelude -
  154. so if you've developed (or simply found) one - give me a shout and
  155. I'll take a look at it.
  156. Bozhidar