warbo-emacs-d

Last updated: 2018-07-03 15:49:03 +0100

Upstream URL: git clone http://chriswarbo.net/git/warbo-emacs-d.git

Repo

View repository

View issue tracker

Contents of README.md follows


License GPL 3 Gratipay Team

Emacs Prelude

Join the chat at https://gitter.im/bbatsov/prelude

Prelude is an Emacs distribution that aims to enhance the default Emacs experience. Prelude alters a lot of the default settings, bundles a plethora of additional packages and adds its own core library to the mix. The final product offers an easy to use Emacs configuration for Emacs newcomers and lots of additional power for Emacs power users.

Prelude is compatible ONLY with GNU Emacs 24.4+. In general you're advised to always run Prelude with the latest Emacs - currently 25.1.

You can support the development of Prelude via Salt and Gratipay.

Support via Gratipay

Table of Contents

<ul> <li>Fast Forward</li> <li>Installing Emacs</li> <li>Installation <ul> <li>Automated <ul> <li>Via Curl</li> <li>Via Wget</li> </ul></li> <li>Manual</li> </ul></li> <li>Updating Prelude <ul> <li>Manual update <ul> <li>Update all bundled packages</li> <li>Update Prelude's code</li> <li>Restart Prelude</li> </ul></li> <li>Automatic update</li> </ul></li> <li>Enabling additional modules</li> <li>Running</li> <li>Getting to know Prelude <ul> <li>Keymap <ul> <li>Global</li> <li>Prelude Mode</li> <li>OSX modifier keys</li> <li>Projectile</li> <li>Helm</li> <li>Key-chords <ul> <li>Disabling key-chords</li> </ul></li> </ul></li> </ul></li> <li>Automatic package installation <ul> <li>Color Themes</li> <li>Personalizing <ul> <li>Disabling whitespace-mode</li> <li>Disable flyspell-mode</li> </ul></li> </ul></li> <li>Caveats & Pitfalls <ul> <li>Updating bundled packages</li> <li>Problems with flyspell-mode</li> <li>Ugly colors in the terminal Emacs version</li> <li>MELPA error on initial startup</li> <li>Warnings on arrow navigation in editor buffers</li> <li>Customized C-a behavior</li> <li>Poor ido matching performance on large datasets</li> <li>Windows compatibility</li> </ul></li> <li>Known issues</li> <li>Support</li> <li>Contributors</li> <li>Bugs & Improvements</li> </ul>

Fast Forward

Assuming you're using an Unix-like OS (<code>*BSD</code>, <code>GNU/Linux</code>, <code>OS X</code>, <code>Solaris</code>, etc), you already have Emacs 24.4+ installed, as well as <code>git</code> & <code>curl</code> you can skip the whole manual and just type in your favorite shell the following command:

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">curl</span> -L https://git.io/epre <span class="kw">|</span> <span class="fu">sh</span></code></pre></div>

You can now power up your Emacs, sit back and enjoy Prelude, forgetting about the rest of this manual.

There are two environment variables you can use to control the source repository and the installation directory. To change the installation directory:

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="bu">export</span> <span class="va">PRELUDE_INSTALL_DIR=</span><span class="st">"</span><span class="va">$HOME</span><span class="st">/.emacs.d"</span> <span class="kw">&&</span> <span class="ex">curl</span> -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh <span class="kw">|</span> <span class="fu">sh</span></code></pre></div>

To change the source repository:

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="bu">export</span> <span class="va">PRELUDE_URL=</span><span class="st">"https://github.com/yourname/prelude.git"</span> <span class="kw">&&</span> <span class="ex">curl</span> -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh <span class="kw">|</span> <span class="fu">sh</span></code></pre></div>

Note that the installer will back up any existing <code>.emacs</code> file or <code>.emacs.d</code> since it will unpack Prelude's code in <code>.emacs.d</code>. If you're doing a manual install make sure you don't have a <code>.emacs</code> file or back up your existing <code>.emacs.d</code> directory manually.

Don't forget to adjust your <code>prelude-modules.el</code> file once the installation is done. By default most of the modules that ship with Prelude are not loaded.

Installing Emacs

Obviously to use the Emacs Prelude you have to install Emacs first. Have a look at the WikEmacs articles on installing Emacs.

Installation

Automated

You can install Emacs Prelude via the command line with either <code>curl</code> or <code>wget</code>. Naturally <code>git</code> is also required.

Via Curl

If you're using <code>curl</code> type the following command:

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">curl</span> -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh <span class="kw">|</span> <span class="fu">sh</span></code></pre></div>

Via Wget

If you're using <code>wget</code> type:

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">wget</span> --no-check-certificate https://github.com/bbatsov/prelude/raw/master/utils/installer.sh -O - <span class="kw">|</span> <span class="fu">sh</span></code></pre></div>

Manual

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">git</span> clone git://github.com/bbatsov/prelude.git path/to/local/repo <span class="fu">ln</span> -s path/to/local/repo ~/.emacs.d <span class="bu">cd</span> ~/.emacs.d</code></pre></div>

If you are using Windows, you should check what Emacs thinks the <code>~</code> directory is by running Emacs and typing <code>C-x d ~/<RET></code>, and then adjust the command appropriately.

Updating Prelude

Manual update

The update procedure is fairly straightforward and consists of 3 steps:

Update all bundled packages

Just run <kbd>M-x package-list-packages RET U x</kbd>.

Update Prelude's code

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="bu">cd</span> path/to/prelude/installation <span class="fu">git</span> pull</code></pre></div>

The <code>path/to/prelude/installation</code> is usually <code>~/.emacs.d</code> (at least on Unix systems).

Restart Prelude

It's generally a good idea to stop Emacs after you do the update. The next time Prelude starts it will install any new dependencies (if there are such).

Automatic update

Simply run <kbd>M-x prelude-update</kbd> from Emacs itself and restart Emacs afterwards.

Enabling additional modules

By default most of the modules that ship with Prelude are not loaded. For more information on the functionality provided by these modules visit the docs.

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp"><span class="co">;;; Uncomment the modules you'd like to use and restart Prelude afterwards</span> (<span class="kw">require</span> 'prelude-c) <span class="co">;; (require 'prelude-clojure)</span> <span class="co">;; (require 'prelude-coffee)</span> <span class="co">;; (require 'prelude-common-lisp)</span> (<span class="kw">require</span> 'prelude-css) (<span class="kw">require</span> 'prelude-emacs-lisp) (<span class="kw">require</span> 'prelude-erc) <span class="co">;; (require 'prelude-erlang)</span> <span class="co">;; (require 'prelude-elixir)</span> (<span class="kw">require</span> 'prelude-haskell) (<span class="kw">require</span> 'prelude-js) (<span class="kw">require</span> 'prelude-latex) (<span class="kw">require</span> 'prelude-lisp) <span class="co">;; (require 'prelude-mediawiki)</span> (<span class="kw">require</span> 'prelude-org) <span class="co">;; (require 'prelude-perl)</span> (<span class="kw">require</span> 'prelude-python) <span class="co">;; (require 'prelude-ruby)</span> <span class="co">;; (require 'prelude-scala)</span> (<span class="kw">require</span> 'prelude-scheme) <span class="co">;; (require 'prelude-scss)</span> (<span class="kw">require</span> 'prelude-web) (<span class="kw">require</span> 'prelude-xml)</code></pre></div>

You'll need to adjust your <code>prelude-modules.el</code> file once the installation is done. If you are doing a manual install then you first need to copy the <code>prelude-modules.el</code> available in the sample directory to the root of <code>path/to/prelude/installation</code> and then adjust that one.

After you've uncommented a module you should either restart Emacs or evaluate the module <code>require</code> expression with <kbd>C-x C-e</kbd>.

Running

Nothing fancy here. Just start Emacs as usual. Personally I run Emacs in daemon mode:

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">emacs</span> --daemon</code></pre></div>

Afterwards I connect to the server with either a terminal or a GUI client like this:

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">emacsclient</span> -t <span class="ex">emacsclient</span> -c</code></pre></div>

You'd probably do well to put a few aliases in your <code>.zshrc</code> (or <code>.bashrc</code>):

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="bu">alias</span> e=<span class="st">'emacsclient -t'</span> <span class="bu">alias</span> ec=<span class="st">'emacsclient -c'</span> <span class="bu">alias</span> vim=<span class="st">'emacsclient -t'</span> <span class="bu">alias</span> vi=<span class="st">'emacsclient -t'</span></code></pre></div>

The last two aliases are helpful if you're used to editing files from the command line using <code>vi(m)</code>.

Also you can open a file with cursor on choosen line:

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">emacsclient</span> somefile:1234</code></pre></div>

This will open file 'somefile' and set cursor on line 1234.

Getting to know Prelude

Certainly the best way to understand how Prelude enhances the default Emacs experience is to peruse Prelude's source code (which is obviously written in Emacs Lisp). Understanding the code is not necessary of course. Prelude includes a <code>prelude-mode</code> minor Emacs mode which collects some of the additional functionality added by Prelude. It also adds an additional keymap that binds many of those extensions to keybindings.

Keymap

Global

<table> <colgroup> <col width="24%"> <col width="75%"> </colgroup> <thead> <tr class="header"> <th>Keybinding</th> <th>Description</th> </tr> </thead> <tbody> <tr class="odd"> <td><kbd>C-x \</kbd></td> <td><code>align-regexp</code></td> </tr> <tr class="even"> <td><kbd>C-+</kbd></td> <td>Increase font size(<code>text-scale-increase</code>).</td> </tr> <tr class="odd"> <td><kbd>C--</kbd></td> <td>Decrease font size(<code>text-scale-decrease</code>).</td> </tr> <tr class="even"> <td><kbd>C-x O</kbd></td> <td>Go back to previous window (the inverse of <code>other-window</code> (<code>C-x o</code>)).</td> </tr> <tr class="odd"> <td><kbd>C-^</kbd></td> <td>Join two lines into one(<code>crux-top-join-line</code>).</td> </tr> <tr class="even"> <td><kbd>C-x p</kbd></td> <td>Start <code>proced</code> (manage processes from Emacs; works only in Linux).</td> </tr> <tr class="odd"> <td><kbd>C-x m</kbd></td> <td>Start <code>eshell</code>.</td> </tr> <tr class="even"> <td><kbd>C-x M-m</kbd></td> <td>Start your default shell.</td> </tr> <tr class="odd"> <td><kbd>C-x C-m</kbd></td> <td>Alias for <code>M-x</code>.</td> </tr> <tr class="even"> <td><kbd>M-X</kbd></td> <td>Like <code>M-x</code> but limited to commands that are relevant to the active major mode.</td> </tr> <tr class="odd"> <td><kbd>C-h A</kbd></td> <td>Run <code>apropos</code> (search in all Emacs symbols).</td> </tr> <tr class="even"> <td><kbd>C-h C-m</kbd></td> <td>Display key bindings of current major mode and descriptions of every binding.</td> </tr> <tr class="odd"> <td><kbd>M-/</kbd></td> <td>Run <code>hippie-expand</code> (a replacement for the default <code>dabbrev-expand</code>).</td> </tr> <tr class="even"> <td><kbd>C-x C-b</kbd></td> <td>Open <code>ibuffer</code> (a replacement for the default <code>buffer-list</code>).</td> </tr> <tr class="odd"> <td><kbd>F11</kbd></td> <td>Make the window full screen.</td> </tr> <tr class="even"> <td><kbd>F12</kbd></td> <td>Toggle the Emacs menu bar.</td> </tr> <tr class="odd"> <td><kbd>C-x g</kbd></td> <td>Open Magit's status buffer.</td> </tr> <tr class="even"> <td><kbd>C-x M-g</kbd></td> <td>Open Magit's popup of popups.</td> </tr> <tr class="odd"> <td><kbd>M-Z</kbd></td> <td>Zap up to char.</td> </tr> <tr class="even"> <td><kbd>C-=</kbd></td> <td>Run <code>expand-region</code> (incremental text selection).</td> </tr> <tr class="odd"> <td><kbd>C-a</kbd></td> <td>Run <code>crux-move-beginning-of-line</code>. Read this for details.</td> </tr> </tbody> </table>

Prelude Mode

<table> <colgroup> <col width="24%"> <col width="75%"> </colgroup> <thead> <tr class="header"> <th>Keybinding</th> <th>Description</th> </tr> </thead> <tbody> <tr class="odd"> <td><kbd>C-c o</kbd></td> <td>Open the currently visited file with an external program.</td> </tr> <tr class="even"> <td><kbd>C-c i</kbd></td> <td>Search for a symbol, only for buffers that contain code</td> </tr> <tr class="odd"> <td><kbd>C-c g</kbd></td> <td>Search in Google for the thing under point (or an interactive query).</td> </tr> <tr class="even"> <td><kbd>C-c G</kbd></td> <td>Search in GitHub for the thing under point (or an interactive query).</td> </tr> <tr class="odd"> <td><kbd>C-c y</kbd></td> <td>Search in YouTube for the thing under point (or an interactive query).</td> </tr> <tr class="even"> <td><kbd>C-c U</kbd></td> <td>Search in Duckduckgo for the thing under point (or an interactive query).</td> </tr> <tr class="odd"> <td><kbd>C-S-RET</kbd> or <kbd>Super-o</kbd></td> <td>Insert an empty line above the current line and indent it properly.</td> </tr> <tr class="even"> <td><kbd>S-RET</kbd> or <kbd>M-o</kbd></td> <td>Insert an empty line and indent it properly (as in most IDEs).</td> </tr> <tr class="odd"> <td><kbd>C-S-up</kbd> or <kbd>M-S-up</kbd></td> <td>Move the current line or region up.</td> </tr> <tr class="even"> <td><kbd>C-S-down</kbd> or <kbd>M-S-down</kbd></td> <td>Move the current line or region down.</td> </tr> <tr class="odd"> <td><kbd>C-c n</kbd></td> <td>Fix indentation in buffer and strip whitespace.</td> </tr> <tr class="even"> <td><kbd>C-c f</kbd></td> <td>Open recently visited file.</td> </tr> <tr class="odd"> <td><kbd>C-M-\</kbd></td> <td>Indent region (if selected) or the entire buffer.</td> </tr> <tr class="even"> <td><kbd>C-c u</kbd></td> <td>Open a new buffer containing the contents of URL.</td> </tr> <tr class="odd"> <td><kbd>C-c e</kbd></td> <td>Eval a bit of Emacs Lisp code and replace it with its result.</td> </tr> <tr class="even"> <td><kbd>C-c s</kbd></td> <td>Swap two active windows.</td> </tr> <tr class="odd"> <td><kbd>C-c D</kbd></td> <td>Delete current file and buffer.</td> </tr> <tr class="even"> <td><kbd>C-c d</kbd></td> <td>Duplicate the current line (or region).</td> </tr> <tr class="odd"> <td><kbd>C-c M-d</kbd></td> <td>Duplicate and comment the current line (or region).</td> </tr> <tr class="even"> <td><kbd>C-c r</kbd></td> <td>Rename the current buffer and its visiting file if any.</td> </tr> <tr class="odd"> <td><kbd>C-c t</kbd></td> <td>Open a terminal emulator (<code>ansi-term</code>).</td> </tr> <tr class="even"> <td><kbd>C-c k</kbd></td> <td>Kill all open buffers except the one you're currently in.</td> </tr> <tr class="odd"> <td><kbd>C-c TAB</kbd></td> <td>Indent and copy region to clipboard</td> </tr> <tr class="even"> <td><kbd>C-c I</kbd></td> <td>Open user's init file.</td> </tr> <tr class="odd"> <td><kbd>C-c S</kbd></td> <td>Open shell's init file.</td> </tr> <tr class="even"> <td><kbd>C-c . +</kbd></td> <td>Increment integer at point. Default is +1.</td> </tr> <tr class="odd"> <td><kbd>C-c . -</kbd></td> <td>Decrement integer at point. Default is -1.</td> </tr> <tr class="even"> <td><kbd>C-c . *</kbd></td> <td>Multiply integer at point. Default is *2.</td> </tr> <tr class="odd"> <td><kbd>C-c . /</kbd></td> <td>Divide integer at point. Default is /2.</td> </tr> <tr class="even"> <td><kbd>C-c . \</kbd></td> <td>Modulo integer at point. Default is modulo 2.</td> </tr> <tr class="odd"> <td><kbd>C-c . ^</kbd></td> <td>Power to the integer at point. Default is ^2.</td> </tr> <tr class="even"> <td><kbd>C-c . <</kbd></td> <td>Left-shift integer at point. Default is 1 position to the left.</td> </tr> <tr class="odd"> <td><kbd>C-c . ></kbd></td> <td>Right-shift integer at point. Default is 1 position to the right.</td> </tr> <tr class="even"> <td><kbd>C-c . #</kbd></td> <td>Convert integer at point to specified base. Default is 10.</td> </tr> <tr class="odd"> <td><kbd>C-c . %</kbd></td> <td>Replace integer at point with another specified integer.</td> </tr> <tr class="even"> <td><kbd>C-c . '</kbd></td> <td>Perform arithmetic operations on integer at point. User specifies the operator.</td> </tr> <tr class="odd"> <td><kbd>Super-g</kbd></td> <td>Toggle between God mode and non-God mode</td> </tr> <tr class="even"> <td><kbd>Super-r</kbd></td> <td>Recent files</td> </tr> <tr class="odd"> <td><kbd>Super-j</kbd></td> <td>Join lines</td> </tr> <tr class="even"> <td><kbd>Super-k</kbd></td> <td>Kill whole line</td> </tr> <tr class="odd"> <td><kbd>Super-m m</kbd></td> <td>Magit status</td> </tr> <tr class="even"> <td><kbd>Super-m l</kbd></td> <td>Magit log</td> </tr> <tr class="odd"> <td><kbd>Super-m f</kbd></td> <td>Magit file log</td> </tr> <tr class="even"> <td><kbd>Super-m b</kbd></td> <td>Magit blame mode</td> </tr> </tbody> </table>

Note: For various arithmetic operations, the prefix <code>C-c .</code> only needs to be pressed once for the first operation. For subsequent operations, only the appropriate operations (i.e. <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>... needs to be pressed).

OSX modifier keys

Prelude does not mess by default with the standard mapping of <code>Command</code> (to <code>Super</code>) and <code>Option</code> (to <code>Meta</code>).

If you want to swap them add this to your personal config:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(<span class="kw">setq</span> mac-command-modifier 'meta) (<span class="kw">setq</span> mac-option-modifier 'super)</code></pre></div>

You can also temporarily swap them with <code>C-c w</code> (<code>M-x prelude-swap-meta-and-super</code>).

Projectile

Here's a list of functionality provided by Projectile:

<table> <colgroup> <col width="24%"> <col width="75%"> </colgroup> <thead> <tr class="header"> <th>Keybinding</th> <th>Description</th> </tr> </thead> <tbody> <tr class="odd"> <td><kbd>C-c p f</kbd></td> <td>Display a list of all files in the project. With a prefix argument it will clear the cache first.</td> </tr> <tr class="even"> <td><kbd>C-c p d</kbd></td> <td>Display a list of all directories in the project. With a prefix argument it will clear the cache first.</td> </tr> <tr class="odd"> <td><kbd>C-c p T</kbd></td> <td>Display a list of all test files(specs, features, etc) in the project.</td> </tr> <tr class="even"> <td><kbd>C-c p s g</kbd></td> <td>Run grep on the files in the project.</td> </tr> <tr class="odd"> <td><kbd>M-- C-c p s g</kbd></td> <td>Run grep on <code>projectile-grep-default-files</code> in the project.</td> </tr> <tr class="even"> <td><kbd>C-c p b</kbd></td> <td>Display a list of all project buffers currently open.</td> </tr> <tr class="odd"> <td><kbd>C-c p o</kbd></td> <td>Runs <code>multi-occur</code> on all project buffers currently open.</td> </tr> <tr class="even"> <td><kbd>C-c p r</kbd></td> <td>Runs interactive query-replace on all files in the projects.</td> </tr> <tr class="odd"> <td><kbd>C-c p i</kbd></td> <td>Invalidates the project cache (if existing).</td> </tr> <tr class="even"> <td><kbd>C-c p R</kbd></td> <td>Regenerates the projects <code>TAGS</code> file.</td> </tr> <tr class="odd"> <td><kbd>C-c p k</kbd></td> <td>Kills all project buffers.</td> </tr> <tr class="even"> <td><kbd>C-c p D</kbd></td> <td>Opens the root of the project in <code>dired</code>.</td> </tr> <tr class="odd"> <td><kbd>C-c p e</kbd></td> <td>Shows a list of recently visited project files.</td> </tr> <tr class="even"> <td><kbd>C-c p s a</kbd></td> <td>Runs <code>ack</code> on the project. Requires the presence of <code>ack-and-a-half</code>.</td> </tr> <tr class="odd"> <td><kbd>C-c p s s</kbd></td> <td>Runs <code>ag</code> on the project. Requires the presence of <code>ag.el</code>.</td> </tr> <tr class="even"> <td><kbd>C-c p a</kbd></td> <td>Switch between files with the same name but different extensions.</td> </tr> <tr class="odd"> <td><kbd>C-c p c</kbd></td> <td>Runs a standard compilation command for your type of project.</td> </tr> <tr class="even"> <td><kbd>C-c p P</kbd></td> <td>Runs a standard test command for your type of project.</td> </tr> <tr class="odd"> <td><kbd>C-c p z</kbd></td> <td>Adds the currently visited to the cache.</td> </tr> <tr class="even"> <td><kbd>C-c p p</kbd></td> <td>Display a list of known projects you can switch to.</td> </tr> </tbody> </table>

Prelude adds an extra keymap prefix <code>S-p</code> (<code>S</code> stands for <code>Super</code>), so you can use <code>S-p</code> instead of <code>C-c p</code>.

If you ever forget any of Projectile's keybindings just do a:

<kbd>C-c p C-h</kbd>

Helm

Helm is setup according to this guide: A Package in a league of its own: Helm.

You can learn Helm usage and key bindings following the guide. <kbd>C-c h</kbd> is Prelude's default prefix key for Helm. If you don't remember any key binding, append <kbd>C-h</kbd> after <kbd>C-c h</kbd> for a list of key bindings in Helm.

If you love Helm and want to use Helm globally with enhanced <code>helm-find-files</code>, <code>helm-buffer-lists</code>..., you will have to also add <code>(require 'prelude-helm-everywhere)</code>. When <code>prelude-helm-everywhere</code> is activated, Helm enables these global key bindings:

<table style="width:93%;"> <colgroup> <col width="27%"> <col width="65%"> </colgroup> <thead> <tr class="header"> <th>Key binding</th> <th>Description</th> </tr> </thead> <tbody> <tr class="odd"> <td><kbd>M-x</kbd></td> <td>Run helm-M-x, an interactive version of <kbd>M-x.</kbd></td> </tr> <tr class="even"> <td><kbd>M-y</kbd></td> <td>Run helm-show-kill-ring, shows the content of <code>kill-ring</code>.</td> </tr> <tr class="odd"> <td><kbd>C-x b </kbd></td> <td>Run helm-mini, an interactive version of <code>C-x b</code> with more features.</td> </tr> <tr class="even"> <td><kbd>C-x C-f</kbd></td> <td>Run helm-find-files, an interactive version of <code>find-file</code> with more features.</td> </tr> <tr class="odd"> <td><kbd>C-h f </kbd></td> <td>Run helm-apropos, an interactive version of <code>apropos-command</code>.</td> </tr> <tr class="even"> <td><kbd>C-h r</kbd></td> <td>Run helm-info-emacs, an interactive version of <code>info-emacs-manual</code>.</td> </tr> <tr class="odd"> <td><kbd>C-h C-l </kbd></td> <td>Run <code>helm-locate-library</code> that can search for locations of any file loaded into Emacs.</td> </tr> </tbody> </table>

This key binding is activated in <code>shell-mode</code>:

<table style="width:93%;"> <colgroup> <col width="27%"> <col width="65%"> </colgroup> <thead> <tr class="header"> <th>Key Binding</th> <th>Description</th> </tr> </thead> <tbody> <tr class="odd"> <td><kbd>C-c C-l</kbd></td> <td>Run <code>helm-comint-input-ring</code> that shows <code>shell</code> history using Helm interface.</td> </tr> </tbody> </table>

This key bindings is activated in <code>eshell-mode</code>:

<table style="width:93%;"> <colgroup> <col width="27%"> <col width="65%"> </colgroup> <thead> <tr class="header"> <th>Key Binding</th> <th>Description</th> </tr> </thead> <tbody> <tr class="odd"> <td><kbd>C-c C-l</kbd></td> <td>Run <code>helm-eshell-history</code> that shows <code>eshell</code> history using Helm interface.</td> </tr> </tbody> </table>

If you prefer Ido in everywhere, you should not add <code>prelude-helm-everywhere</code>, so you can use Helm along with Ido and Prelude's default commands.

You can always reactivate Helm with <code>(prelude-global-helm-global-mode-on)</code>.

NOTICE: In <code>helm-M-x</code>, you have to pass prefix argument <em>AFTER</em> you run <code>helm-M-x</code>, because your prefix argument will be displayed in the modeline when in <code>helm-M-x</code> buffer. Passing prefix argument BEFORE =helm-M-x= has no effect.

Key-chords

Key-chords are available only when the <code>prelude-key-chord</code> module has been enabled.

<table> <thead> <tr class="header"> <th>Keybinding</th> <th>Description</th> </tr> </thead> <tbody> <tr class="odd"> <td><kbd>jj</kbd></td> <td>Jump to the beginning of a word(<code>avy-goto-word-1</code>)</td> </tr> <tr class="even"> <td><kbd>jk</kbd></td> <td>Jump to a character(<code>avy-goto-char</code>)</td> </tr> <tr class="odd"> <td><kbd>jl</kbd></td> <td>Jump to the beginning of a line(<code>avy-goto-line</code>)</td> </tr> <tr class="even"> <td><kbd>JJ</kbd></td> <td>Jump back to previous buffer(<code>crux-switch-to-previous-buffer</code>)</td> </tr> <tr class="odd"> <td><kbd>uu</kbd></td> <td>View edits as a tree(<code>undo-tree-visualize</code>)</td> </tr> <tr class="even"> <td><kbd>xx</kbd></td> <td>Executed extended command(<code>execute-extended-command</code>)</td> </tr> <tr class="odd"> <td><kbd>yy</kbd></td> <td>Browse the kill ring(<code>browse-kill-ring</code>)</td> </tr> </tbody> </table> <h5 id="disabling-key-chords">Disabling key-chords</h5>

In some cases you may not want to have a key-chord that is defined by prelude, in which case you can disable the binding in your <code>personal.el</code> file by setting its command to <code>nil</code>. For example, to disable the <code>jj</code> key-chord add the following line:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(key-chord-define-global <span class="st">"jj"</span> <span class="kw">nil</span>)</code></pre></div>

If you're an <code>evil-mode</code> user you'll probably do well to disable <code>key-chord-mode</code> altogether:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(key-chord-mode -<span class="dv">1</span>)</code></pre></div>

vim emulation

If you want to use vim inside of emacs enable the <code>prelude-evil</code> module which provides support for <code>evil-mode</code>.

Automatic package installation

The default Prelude installation comes with a bare minimum of functionality. It will however install add-ons for various programming languages and frameworks on demand. For instance - if you try to open a <code>.clj</code> file <code>clojure-mode</code>, <code>cider</code> and Prelude's enhanced Lisp configuration will be installed automatically for you.

You can, of course, install anything you wish manually as well.

Color Themes

Emacs provides a dozen of built-in themes you can use out-of-the-box by invoking the <code>M-x load-theme</code> command.

Zenburn is the default color theme in Prelude, but you can change it at your discretion. Why Zenburn? I (and lots of hackers around the world) find it pretty neat for some reason. Personally I find the default theme pretty tiresome for the eyes, that's why I took that "controversial" decision to replace it. You can, of course, easily go back to the default (or select another theme entirely).

To disable Zenburn just put in your personal config the following line:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(disable-theme 'zenburn)</code></pre></div>

Or you can use another theme altogether by adding something in <code>personal/preload</code> like:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(<span class="kw">setq</span> prelude-theme 'solarized-dark)</code></pre></div>

P.S. Solarized is not available by default - you'll have to install it from MELPA first (<code>M-x package-install RET solarized-theme</code>).

Finally, if you don't want any theme at all, you can add this to your <code>personal/preload</code>:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(<span class="kw">setq</span> prelude-theme <span class="kw">nil</span>)</code></pre></div>

Personalizing

Fork the official Prelude repo and add your own touch to it. You're advised to avoid changing stuff outside of the personal folder to avoid having to deal with git merge conflicts in the future.

If you'd like to add some auto installation of packages in your personal config use the following code:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(prelude-require-packages '(some-package some-other-package))</code></pre></div>

If you require just a single package you can also use:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(prelude-require-package 'some-package)</code></pre></div>

Preloading personal config

Sometimes you might want to load code before Prelude has started loading. Prelude will automatically preload all Emacs Lisp files in your <code>personal/preload</code> directory. Note that at this point you can't using anything from Prelude, except a few variables like <code>prelude-dir</code>, etc (since nothing is yet loaded).

Disabling whitespace-mode

Although <code>whitespace-mode</code> is awesome some people might find it too intrusive. You can disable it in your personal config with the following bit of code:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(<span class="kw">setq</span> prelude-whitespace <span class="kw">nil</span>)</code></pre></div>

If you like <code>whitespace-mode</code> but prefer it to not automatically cleanup your file on save, you can disable that behavior by setting prelude-clean-whitespace-on-save to nil in your config file with:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(<span class="kw">setq</span> prelude-clean-whitespace-on-save <span class="kw">nil</span>)</code></pre></div>

The prelude-clean-whitespace-on-save setting can also be set on a per-file or directory basis by using a file variable or a .dir-locals.el file.

Disable flyspell-mode

If you're not fond of spellchecking on the fly:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(<span class="kw">setq</span> prelude-flyspell <span class="kw">nil</span>)</code></pre></div>

Caveats & Pitfalls

Updating bundled packages

Generally it's a good idea to do a package update before running updating Prelude, since the latest Prelude code might depend on newer versions of the bundled packages than you would currently have installed.

If you're doing manual Prelude updates you should always do a package update first.

<code>M-x package-list-packages RET U x</code>

That's not necessary if you're using <code>M-x prelude-update</code>, since it will automatically update the installed packages.

Problems with flyspell-mode

Prelude makes heavy use of the flyspell-mode package for spell checking of various things. The proper operation of flyspell depends on the presence of the <code>aspell</code> program and an <code>en</code> dictionary on your system. You can install <code>aspell</code> and the dictionary on OS X with <code>homebrew</code> like this:

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">brew</span> install aspell --with-lang=en</code></pre></div>

On Linux distros - just use your distro's package manager.

Ugly colors in the terminal Emacs version

If your Emacs looks considerably uglier in a terminal (compared to the GUI version) try adding this to your <code>.bashrc</code> or <code>.zshrc</code>:

<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="bu">export</span> <span class="va">TERM=</span>xterm-256color</code></pre></div>

Source the <code>.bashrc</code> file and start Emacs again.

MELPA error on initial startup

If you get some http connection error related to the MELPA repo just do a manual <code>M-x package-refresh-contents</code> and restart Emacs afterwards.

Warnings on arrow navigation in editor buffers

This is not a bug - it's a feature! I firmly believe that the one true way to use Emacs is by using it the way it was intended to be used (as far as navigation is concerned at least).

If you'd like to be take this a step further and disable the arrow key navigation completely put this in your personal config:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(<span class="kw">setq</span> guru-warn-only <span class="kw">nil</span>)</code></pre></div>

To disable <code>guru-mode</code> completely add the following snippet to your personal Emacs config:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(<span class="kw">setq</span> prelude-guru <span class="kw">nil</span>)</code></pre></div>

Customized C-a behavior

Prelude overrides <code>C-a</code> to behave as described here. If you don't like that simply add this to your personal config:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(global-set-key [remap move-beginning-of-line] 'move-beginning-of-line)</code></pre></div>

Poor ido matching performance on large datasets

Prelude swaps the default <code>ido</code> flex matching with the more powerful ido-flx.

The sorting algorithm <code>flx</code> uses is more complex, but yields better results.

On slower machines, it may be necessary to lower <code>flx-ido-threshold</code> to ensure a smooth experience.

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(<span class="kw">setq</span> flx-ido-threshold <span class="dv">1000</span>)</code></pre></div>

You can always disable the improved sorting algorithm all together like this:

<div class="sourceCode"><pre class="sourceCode lisp"><code class="sourceCode commonlisp">(flx-ido-mode -<span class="dv">1</span>)</code></pre></div>

Windows compatibility

While everything in Prelude should work fine in Windows, I test it only with Linux & OS X, so there are Windows related problems from time to time. This situation will probably improve over time.

Known issues

Check out the project's issue list a list of unresolved issues. By the way - feel free to fix any of them and send me a pull request. :-)

Support

Support is available via the Prelude Google Group <script type="text/javascript"> <!-- h='googlegroups.com';a='@';n='emacs-prelude';e=n+a+h; document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\/'+'a'+'>'); // --> </script><noscript>emacs-prelude at googlegroups dot com</noscript>.

There's also a Freenode channel you can visit - <code>#prelude-emacs</code>.

Contributors

Here's a list of all the people who have contributed to the development of Emacs Prelude.

Bugs & Improvements

Bug reports and suggestions for improvements are always welcome. GitHub pull requests are even better! :-)

Cheers,<br> Bozhidar