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.

736 lines
27 KiB

12 years ago
12 years ago
13 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
14 years ago
14 years ago
11 years ago
12 years ago
8 years ago
12 years ago
  1. [![License GPL 3][badge-license]](http://www.gnu.org/licenses/gpl-3.0.txt)
  2. [![Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/bbatsov/donate)
  3. [![Patreon](https://img.shields.io/badge/patreon-donate-orange.svg)](https://www.patreon.com/bbatsov)
  4. Emacs Prelude
  5. =============
  6. Prelude is an Emacs distribution that aims to enhance the default
  7. Emacs experience. Prelude alters a lot of the default settings,
  8. bundles a plethora of additional packages and adds its own core
  9. library to the mix. The final product offers an easy to use Emacs
  10. configuration for Emacs newcomers and lots of additional power for
  11. Emacs power users.
  12. Prelude is compatible **ONLY with GNU Emacs 24.4+**. In general you're
  13. advised to always run Prelude with the latest Emacs - currently
  14. **25.2**.
  15. You can support the development of Prelude via
  16. [Salt](https://bountysource.com/teams/prelude),
  17. [Patreon](https://www.patreon.com/bbatsov) and
  18. [Liberapay](https://liberapay.com/bbatsov/donate).
  19. [![Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/bbatsov/donate)
  20. [![Patreon](https://img.shields.io/badge/patreon-donate-orange.svg)](https://www.patreon.com/bbatsov)
  21. **Table of Contents**
  22. - [Fast Forward](#fast-forward)
  23. - [Installing Emacs](#installing-emacs)
  24. - [Installation](#installation)
  25. - [Automated](#automated)
  26. - [Via Curl](#via-curl)
  27. - [Via Wget](#via-wget)
  28. - [Manual](#manual)
  29. - [Updating Prelude](#updating-prelude)
  30. - [Manual update](#manual-update)
  31. - [Update all bundled packages](#update-all-bundled-packages)
  32. - [Update Prelude's code](#update-preludes-code)
  33. - [Restart Prelude](#restart-prelude)
  34. - [Automatic update](#automatic-update)
  35. - [Enabling additional modules](#enabling-additional-modules)
  36. - [Running](#running)
  37. - [Getting to know Prelude](#getting-to-know-prelude)
  38. - [Keymap](#keymap)
  39. - [Global](#global)
  40. - [Prelude Mode](#prelude-mode)
  41. - [macOS modifier keys](#macos-modifier-keys)
  42. - [Projectile](#projectile)
  43. - [Helm](#helm)
  44. - [Key-chords](#key-chords)
  45. - [Disabling key-chords](#disabling-key-chords)
  46. - [Cheatsheet](#cheatsheet)
  47. - [Automatic package installation](#automatic-package-installation)
  48. - [Color Themes](#color-themes)
  49. - [Personalizing](#personalizing)
  50. - [Disabling whitespace-mode](#disabling-whitespace-mode)
  51. - [Disable flyspell-mode](#disable-flyspell-mode)
  52. - [Caveats & Pitfalls](#caveats--pitfalls)
  53. - [Updating bundled packages](#updating-bundled-packages)
  54. - [Problems with flyspell-mode](#problems-with-flyspell-mode)
  55. - [Ugly colors in the terminal Emacs version](#ugly-colors-in-the-terminal-emacs-version)
  56. - [MELPA error on initial startup](#melpa-error-on-initial-startup)
  57. - [Warnings on arrow navigation in editor buffers](#warnings-on-arrow-navigation-in-editor-buffers)
  58. - [Customized C-a behavior](#customized-c-a-behavior)
  59. - [Poor ido matching performance on large datasets](#poor-ido-matching-performance-on-large-datasets)
  60. - [Windows compatibility](#windows-compatibility)
  61. - [Known issues](#known-issues)
  62. - [Support](#support)
  63. - [Contributors](#contributors)
  64. - [Bugs & Improvements](#bugs--improvements)
  65. ## Fast Forward
  66. Assuming you're using an Unix-like OS (`*BSD`, `GNU/Linux`, `macOS`, `Solaris`,
  67. etc), you already have Emacs 24.4+ installed, as well as `git` & `curl` you
  68. can skip the whole manual and just type in your favorite shell the
  69. following command:
  70. ```bash
  71. curl -L https://git.io/epre | sh
  72. ```
  73. You can now power up your Emacs, sit back and enjoy Prelude,
  74. forgetting about the rest of this manual.
  75. There are two environment variables you can use to control the
  76. source repository and the installation directory. To change the
  77. installation directory:
  78. ```bash
  79. export PRELUDE_INSTALL_DIR="$HOME/.emacs.d" && curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
  80. ```
  81. To change the source repository:
  82. ```bash
  83. export PRELUDE_URL="https://github.com/yourname/prelude.git" && curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
  84. ```
  85. Note that the installer will back up any existing `.emacs` file or
  86. `.emacs.d` since it will unpack Prelude's code in `.emacs.d`. If
  87. you're doing a manual install make sure you don't have a `.emacs` file
  88. or back up your existing `.emacs.d` directory manually.
  89. Don't forget to adjust your `prelude-modules.el` file once the installation is done.
  90. By default most of the modules that ship with Prelude are not loaded.
  91. ## Installing Emacs
  92. Obviously to use the Emacs Prelude you have to install Emacs
  93. first. Have a look at
  94. the
  95. [WikEmacs articles on installing Emacs](http://wikemacs.org/index.php/Installing_Emacs).
  96. ## Installation
  97. ### Automated
  98. You can install **Emacs Prelude** via the command line with either `curl` or
  99. `wget`. Naturally `git` is also required.
  100. #### Via Curl
  101. If you're using `curl` type the following command:
  102. ```bash
  103. curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
  104. ```
  105. #### Via Wget
  106. If you're using `wget` type:
  107. ```bash
  108. wget --no-check-certificate https://github.com/bbatsov/prelude/raw/master/utils/installer.sh -O - | sh
  109. ```
  110. ### Manual
  111. Make sure you do not have any `~/.emacs` file present.
  112. ```bash
  113. git clone git://github.com/bbatsov/prelude.git path/to/local/repo
  114. ln -s path/to/local/repo ~/.emacs.d
  115. cd ~/.emacs.d
  116. ```
  117. If you are using Windows, you should check what Emacs thinks the `~` directory is by running Emacs and typing `C-x d ~/<RET>`, and then adjust the command appropriately.
  118. ## Updating Prelude
  119. ### Manual update
  120. The update procedure is fairly straightforward and consists of 3 steps:
  121. #### Update all bundled packages
  122. Just run <kbd>M-x package-list-packages RET U x</kbd>.
  123. #### Update Prelude's code
  124. ```bash
  125. cd path/to/prelude/installation
  126. git pull
  127. ```
  128. The `path/to/prelude/installation` is usually `~/.emacs.d` (at least
  129. on Unix systems).
  130. #### Restart Prelude
  131. It's generally a good idea to stop Emacs after you do the update. The
  132. next time Prelude starts it will install any new dependencies (if
  133. there are such).
  134. ### Automatic update
  135. Simply run <kbd>M-x prelude-update</kbd> from Emacs itself and restart Emacs afterwards.
  136. ## Pinning packages
  137. By default, Prelude will install packages from the melpa and gnu package
  138. repositories. Occasionally package integration can break when upgrading packages.
  139. This can be avoided by pinning packages to stable versions in other repositories.
  140. To do so, copy `prelude-pinned-packages.el` from the sample directory to
  141. Prelude's root directory and adjust the [variables](https://www.gnu.org/software/emacs/manual/html_node/emacs/Package-Installation.html)
  142. inside accordingly.
  143. ## Enabling additional modules
  144. 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](modules/doc/README.md).
  145. ```lisp
  146. ;;; Uncomment the modules you'd like to use and restart Prelude afterwards
  147. (require 'prelude-c)
  148. ;; (require 'prelude-clojure)
  149. ;; (require 'prelude-coffee)
  150. ;; (require 'prelude-common-lisp)
  151. ;; (require 'prelude-css)
  152. (require 'prelude-emacs-lisp)
  153. (require 'prelude-erc)
  154. ;; (require 'prelude-erlang)
  155. ;; (require 'prelude-elixir)
  156. ;; (require 'prelude-haskell)
  157. (require 'prelude-js)
  158. ;; (require 'prelude-latex)
  159. (require 'prelude-lisp)
  160. ;; (require 'prelude-mediawiki)
  161. (require 'prelude-org)
  162. (require 'prelude-perl)
  163. ;; (require 'prelude-python)
  164. ;; (require 'prelude-ruby)
  165. ;; (require 'prelude-scala)
  166. (require 'prelude-scheme)
  167. ;; (require 'prelude-scss)
  168. ;; (require 'prelude-web)
  169. (require 'prelude-xml)
  170. ```
  171. You'll need to adjust your `prelude-modules.el` file once the
  172. installation is done. If you are doing a manual install then you first
  173. need to copy the `prelude-modules.el` available in the sample
  174. directory to the root of `path/to/prelude/installation` and then
  175. adjust that one.
  176. After you've uncommented a module you should either restart Emacs or evaluate the module
  177. `require` expression with <kbd>C-x C-e</kbd>.
  178. ## Running
  179. Nothing fancy here. Just start Emacs as usual. Personally I run Emacs
  180. in daemon mode:
  181. ```bash
  182. emacs --daemon
  183. ```
  184. Afterwards I connect to the server with either a terminal or a GUI
  185. client like this:
  186. ```bash
  187. emacsclient -t
  188. emacsclient -c
  189. ```
  190. You'd probably do well to put a few aliases in your `.zshrc` (or
  191. `.bashrc`):
  192. ```bash
  193. alias e='emacsclient -t'
  194. alias ec='emacsclient -c'
  195. alias vim='emacsclient -t'
  196. alias vi='emacsclient -t'
  197. ```
  198. The last two aliases are helpful if you're used to editing files from
  199. the command line using `vi(m)`.
  200. You can also open a file with the cursor positioned directly on a specific line:
  201. ```bash
  202. emacsclient somefile:1234
  203. ```
  204. This will open file 'somefile' and set cursor on line 1234.
  205. ## Getting to know Prelude
  206. Certainly the best way to understand how Prelude enhances the default
  207. Emacs experience is to peruse Prelude's source code (which is
  208. obviously written in Emacs Lisp). Understanding the code is not
  209. necessary of course. Prelude includes a `prelude-mode` minor Emacs mode
  210. which collects some of the additional functionality added by
  211. Prelude. It also adds an additional keymap that binds many of those
  212. extensions to keybindings.
  213. ### Keymap
  214. #### Global
  215. Keybinding | Description
  216. -------------------|------------------------------------------------------------
  217. <kbd>C-x \\</kbd> | `align-regexp`
  218. <kbd>C-+</kbd> | Increase font size(`text-scale-increase`).
  219. <kbd>C--</kbd> | Decrease font size(`text-scale-decrease`).
  220. <kbd>C-x O</kbd> | Go back to previous window (the inverse of `other-window` (`C-x o`)).
  221. <kbd>C-^</kbd> | Join two lines into one(`crux-top-join-line`).
  222. <kbd>C-x p</kbd> | Start `proced` (manage processes from Emacs; works only in Linux).
  223. <kbd>C-x m</kbd> | Start `eshell`.
  224. <kbd>C-x M-m</kbd> | Start your default shell.
  225. <kbd>C-x C-m</kbd> | Alias for `M-x`.
  226. <kbd>M-X</kbd> | Like `M-x` but limited to commands that are relevant to the active major mode.
  227. <kbd>C-h A</kbd> | Run `apropos` (search in all Emacs symbols).
  228. <kbd>C-h C-m</kbd> | Display key bindings of current major mode and descriptions of every binding.
  229. <kbd>M-/</kbd> | Run `hippie-expand` (a replacement for the default `dabbrev-expand`).
  230. <kbd>C-x C-b</kbd> | Open `ibuffer` (a replacement for the default `buffer-list`).
  231. <kbd>F11</kbd> | Make the window full screen.
  232. <kbd>F12</kbd> | Toggle the Emacs menu bar.
  233. <kbd>C-x g</kbd> | Open Magit's status buffer.
  234. <kbd>C-x M-g</kbd> | Open Magit's popup of popups.
  235. <kbd>M-Z</kbd> | Zap up to char.
  236. <kbd>C-=</kbd> | Run `expand-region` (incremental text selection).
  237. <kbd>C-a</kbd> | Run `crux-move-beginning-of-line`. Read [this](http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beginning-of-a-line/) for details.
  238. #### Prelude Mode
  239. Keybinding | Description
  240. -------------------|------------------------------------------------------------
  241. <kbd>C-c o</kbd> | Open the currently visited file with an external program.
  242. <kbd>C-c i</kbd> | Search for a symbol, only for buffers that contain code
  243. <kbd>C-c g</kbd> | Search in Google for the thing under point (or an interactive query).
  244. <kbd>C-c G</kbd> | Search in GitHub for the thing under point (or an interactive query).
  245. <kbd>C-c y</kbd> | Search in YouTube for the thing under point (or an interactive query).
  246. <kbd>C-c U</kbd> | Search in Duckduckgo for the thing under point (or an interactive query).
  247. <kbd>C-S-RET</kbd> or <kbd>Super-o</kbd> | Insert an empty line above the current line and indent it properly.
  248. <kbd>S-RET</kbd> or <kbd>M-o</kbd> | Insert an empty line and indent it properly (as in most IDEs).
  249. <kbd>C-S-up</kbd> or <kbd>M-S-up</kbd> | Move the current line or region up.
  250. <kbd>C-S-down</kbd> or <kbd>M-S-down</kbd>| Move the current line or region down.
  251. <kbd>C-c n</kbd> | Fix indentation in buffer and strip whitespace.
  252. <kbd>C-c f</kbd> | Open recently visited file.
  253. <kbd>C-M-\\</kbd> | Indent region (if selected) or the entire buffer.
  254. <kbd>C-c u</kbd> | Open a new buffer containing the contents of URL.
  255. <kbd>C-c e</kbd> | Eval a bit of Emacs Lisp code and replace it with its result.
  256. <kbd>C-c s</kbd> | Swap two active windows.
  257. <kbd>C-c D</kbd> | Delete current file and buffer.
  258. <kbd>C-c d</kbd> | Duplicate the current line (or region).
  259. <kbd>C-c M-d</kbd> | Duplicate and comment the current line (or region).
  260. <kbd>C-c r</kbd> | Rename the current buffer and its visiting file if any.
  261. <kbd>C-c t</kbd> | Open a terminal emulator (`ansi-term`).
  262. <kbd>C-c k</kbd> | Kill all open buffers except the one you're currently in.
  263. <kbd>C-c TAB</kbd> | Indent and copy region to clipboard
  264. <kbd>C-c I</kbd> | Open user's init file.
  265. <kbd>C-c S</kbd> | Open shell's init file.
  266. <kbd>C-c . +</kbd> | Increment integer at point. Default is +1.
  267. <kbd>C-c . -</kbd> | Decrement integer at point. Default is -1.
  268. <kbd>C-c . *</kbd> | Multiply integer at point. Default is *2.
  269. <kbd>C-c . /</kbd> | Divide integer at point. Default is /2.
  270. <kbd>C-c . \\</kbd> | Modulo integer at point. Default is modulo 2.
  271. <kbd>C-c . ^</kbd> | Power to the integer at point. Default is ^2.
  272. <kbd>C-c . <</kbd> | Left-shift integer at point. Default is 1 position to the left.
  273. <kbd>C-c . ></kbd> | Right-shift integer at point. Default is 1 position to the right.
  274. <kbd>C-c . #</kbd> | Convert integer at point to specified base. Default is 10.
  275. <kbd>C-c . %</kbd> | Replace integer at point with another specified integer.
  276. <kbd>C-c . '</kbd> | Perform arithmetic operations on integer at point. User specifies the operator.
  277. <kbd>Super-g</kbd> | Toggle between God mode and non-God mode
  278. <kbd>Super-r</kbd> | Recent files
  279. <kbd>Super-j</kbd> | Join lines
  280. <kbd>Super-k</kbd> | Kill whole line
  281. <kbd>Super-m m</kbd> | Magit status
  282. <kbd>Super-m l</kbd> | Magit log
  283. <kbd>Super-m f</kbd> | Magit file log
  284. <kbd>Super-m b</kbd> | Magit blame mode
  285. **Note**: For various arithmetic operations, the prefix `C-c .` only needs to be pressed once for the first operation.
  286. For subsequent operations, only the appropriate operations (i.e. `+`, `-`, `*`, `/`... needs to be pressed).
  287. #### macOS modifier keys
  288. Prelude does not mess by default with the standard mapping of `Command` (to `Super`) and `Option` (to `Meta`).
  289. If you want to swap them add this to your personal config:
  290. ```lisp
  291. (setq mac-command-modifier 'meta)
  292. (setq mac-option-modifier 'super)
  293. ```
  294. You can also temporarily swap them with `C-c w` (`M-x prelude-swap-meta-and-super`).
  295. **Note**: I'd highly recommend to all macOS users to consider
  296. [remapping Return to
  297. Control](http://emacsredux.com/blog/2013/11/12/a-crazy-productivity-boost-remap-return-to-control/)
  298. instead. That's an epic productivity boost and it's not as crazy as it sounds!
  299. #### Projectile
  300. [Projectile](https://github.com/bbatsov/projectile) is one of the essential packages bundled with Prelude.
  301. It provides an easy way to navigate and switch projects. Take a look at its extensive documentation
  302. to get a feel for everything you can do with Projectile.
  303. Prelude adds an extra keymap prefix `s-p` (`s` stands for
  304. `Super`) in addition to the standard one `C-c p`. By default on Windows keyboard
  305. `Super` is mapped to the `Windows` key and on macOS keyboards `Super` is mapped
  306. to the `Command` key.
  307. If you ever forget any of Projectile's keybindings just do a:
  308. <kbd>C-c p C-h</kbd> or <kbd>s-p C-h</kbd>
  309. Alternatively you can just press <kbd>s-p</kbd> and wait for a moment
  310. for `which-key` to kick in and show you the available keybindings.
  311. #### Helm
  312. Helm is setup according to this guide: [A Package in a league of its own: Helm](http://tuhdo.github.io/helm-intro.html).
  313. You can learn Helm usage and key bindings following the guide. <kbd>C-c h</kbd> is Prelude's default prefix key for Helm.
  314. 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.
  315. If you love Helm and want to use Helm globally with enhanced `helm-find-files`, `helm-buffer-lists`..., you will have to also add `(require 'prelude-helm-everywhere)`.
  316. When `prelude-helm-everywhere` is activated, Helm enables these global key bindings:
  317. Key binding | Description
  318. -------------------|----------------------------------------------
  319. <kbd>M-x</kbd> | Run [helm-M-x](http://tuhdo.github.io/helm-intro.html#sec-3), an interactive version of <kbd>M-x</kdb>.
  320. <kbd>M-y</kbd> | Run [helm-show-kill-ring](http://tuhdo.github.io/helm-intro.html#sec-4), shows the content of `kill-ring`.
  321. <kbd>C-x b </kbd> | Run [helm-mini](http://tuhdo.github.io/helm-intro.html#sec-5), an interactive version of `C-x b` with more features.
  322. <kbd>C-x C-f</kbd> | Run [helm-find-files](http://tuhdo.github.io/helm-intro.html#sec-6), an interactive version of `find-file` with more features.
  323. <kbd>C-h f </kbd> | Run [helm-apropos](http://tuhdo.github.io/helm-intro.html#sec-13), an interactive version of `apropos-command`.
  324. <kbd>C-h r</kbd> | Run [helm-info-emacs](http://tuhdo.github.io/helm-intro.html#sec-14), an interactive version of `info-emacs-manual`.
  325. <kbd>C-h C-l </kbd>| Run `helm-locate-library` that can search for locations of any file loaded into Emacs.
  326. This key binding is activated in `shell-mode`:
  327. Key Binding | Description
  328. -------------------|----------------------------------------------
  329. <kbd>C-c C-l</kbd> | Run `helm-comint-input-ring` that shows `shell` history using Helm interface.
  330. This key bindings is activated in `eshell-mode`:
  331. Key Binding | Description
  332. -------------------|----------------------------------------------
  333. <kbd>C-c C-l</kbd> | Run `helm-eshell-history` that shows `eshell` history using Helm interface.
  334. If you prefer Ido in everywhere, you should not add `prelude-helm-everywhere`, so you can use Helm along with Ido and Prelude's default commands.
  335. You can always reactivate Helm with `(prelude-global-helm-global-mode-on)`.
  336. **NOTICE**: In `helm-M-x`, you have to pass prefix argument *AFTER* you run `helm-M-x`,
  337. because your prefix argument will be displayed in the modeline when in `helm-M-x`
  338. buffer. Passing prefix argument **BEFORE** =helm-M-x= **has no effect**.
  339. #### Key-chords
  340. **Key-chords are available only when the `prelude-key-chord` module has been enabled.**
  341. Keybinding | Description
  342. -------------------|----------------------------------------------
  343. <kbd>jj</kbd> | Jump to the beginning of a word(`avy-goto-word-1`)
  344. <kbd>jk</kbd> | Jump to a character(`avy-goto-char`)
  345. <kbd>jl</kbd> | Jump to the beginning of a line(`avy-goto-line`)
  346. <kbd>JJ</kbd> | Jump back to previous buffer(`crux-switch-to-previous-buffer`)
  347. <kbd>uu</kbd> | View edits as a tree(`undo-tree-visualize`)
  348. <kbd>xx</kbd> | Executed extended command(`execute-extended-command`)
  349. <kbd>yy</kbd> | Browse the kill ring(`browse-kill-ring`)
  350. ##### Disabling key-chords
  351. In some cases you may not want to have a key-chord that is defined by prelude,
  352. in which case you can disable the binding in your `personal.el` file by setting
  353. its command to `nil`. For example, to disable the `jj` key-chord add the
  354. following line:
  355. ```lisp
  356. (key-chord-define-global "jj" nil)
  357. ```
  358. If you're an `evil-mode` user you'll probably do well to disable `key-chord-mode` altogether:
  359. ```lisp
  360. (key-chord-mode -1)
  361. ```
  362. #### vim emulation
  363. If you want to use vim keybindings inside of Emacs enable the `prelude-evil` module which provides
  364. support for `evil-mode`.
  365. ### Cheatsheet
  366. Use `C-h k <key>` (`<key>` are the ones listed on the left) or `C-h f <function>` (`<function>` are the ones listed on the right) to see the detailed explanation.
  367. ![cheatsheet](/modules/doc/cheatsheet.png)
  368. #### PDF generation
  369. Install [LaTeX](https://www.latex-project.org/get/)
  370. ``` bash
  371. cd modules/doc
  372. pdflatex prelude-cheatsheet.tex
  373. ```
  374. #### PNG generation
  375. Install [Poppler](https://poppler.freedesktop.org/)
  376. ``` bash
  377. cd modules/doc
  378. pdftocairo -png -singlefile prelude-cheatsheet.pdf cheatsheet
  379. ```
  380. ## Automatic package installation
  381. The default Prelude installation comes with a bare minimum of
  382. functionality. It will however install add-ons for various programming
  383. languages and frameworks on demand. For instance - if you try to open
  384. a `.clj` file `clojure-mode`, `cider` and Prelude's enhanced Lisp
  385. configuration will be installed automatically for you.
  386. You can, of course, install anything you wish manually as well.
  387. ### Color Themes
  388. Emacs provides a dozen of
  389. built-in themes you can use out-of-the-box by invoking the `M-x
  390. load-theme` command.
  391. [Zenburn](https://github.com/bbatsov/zenburn-emacs) is the default
  392. color theme in Prelude, but you can change it at your discretion. Why
  393. Zenburn? I (and lots of hackers around the world) find it pretty neat
  394. for some reason. Personally I find the default theme pretty tiresome
  395. for the eyes, that's why I took that "controversial" decision to
  396. replace it. You can, of course, easily go back to the default (or
  397. select another theme entirely).
  398. To disable Zenburn just put in your personal config the following
  399. line:
  400. ```lisp
  401. (disable-theme 'zenburn)
  402. ```
  403. Or you can use another theme altogether by adding something in `personal/preload` like:
  404. ```lisp
  405. (prelude-require-package 'solarized-theme)
  406. (setq prelude-theme 'solarized-dark)
  407. ```
  408. **Note** [Solarized](https://github.com/bbatsov/zenburn-emacs) is not
  409. available by default - you'll have to install it from MELPA first,
  410. therefore the need for `prelude-require-package`. Alternatively you
  411. can manually install the package like this - `M-x package-install RET
  412. solarized-theme`.
  413. Finally, if you don't want any theme at all, you can add this to your
  414. `personal/preload`:
  415. ```lisp
  416. (setq prelude-theme nil)
  417. ```
  418. ### Personalizing
  419. **Fork** (instead of cloning) the official Prelude repo and add your
  420. own touch to it. You're advised to **avoid changing stuff outside of
  421. the personal folder** to avoid having to deal with git merge conflicts
  422. in the future.
  423. If you'd like to add some auto installation of packages in your
  424. personal config use the following code:
  425. ```lisp
  426. (prelude-require-packages '(some-package some-other-package))
  427. ```
  428. If you require just a single package you can also use:
  429. ```lisp
  430. (prelude-require-package 'some-package)
  431. ```
  432. #### Preloading personal config
  433. Sometimes you might want to load code before Prelude has started loading. Prelude will automatically preload all
  434. Emacs Lisp files in your `personal/preload` directory. Note that at this point you can't using anything from
  435. Prelude, except a few variables like `prelude-dir`, etc (since nothing is yet loaded).
  436. #### Disabling whitespace-mode
  437. Although `whitespace-mode` is awesome, some people might find it too
  438. intrusive. You can disable it in your
  439. personal config with the following bit of code:
  440. ```lisp
  441. (setq prelude-whitespace nil)
  442. ```
  443. If you like `whitespace-mode`, but prefer it to not automatically
  444. cleanup your file on save, you can disable that behavior by setting
  445. `prelude-clean-whitespace-on-save` to `nil` in your config file with:
  446. ```lisp
  447. (setq prelude-clean-whitespace-on-save nil)
  448. ```
  449. The `prelude-clean-whitespace-on-save` setting can also be set on a
  450. per-file or directory basis by using a file variable or a
  451. `.dir-locals.el` file.
  452. #### Disable flyspell-mode
  453. If you're not fond of spellchecking on the fly:
  454. ```lisp
  455. (setq prelude-flyspell nil)
  456. ```
  457. ## Caveats & Pitfalls
  458. ### Updating bundled packages
  459. Generally it's a good idea to do a package update before running
  460. updating Prelude, since the latest Prelude code might depend on newer
  461. versions of the bundled packages than you would currently have
  462. installed.
  463. If you're doing manual Prelude updates you should always do a package update first.
  464. `M-x package-list-packages RET U x`
  465. That's not necessary if you're using `M-x prelude-update`, since it
  466. will automatically update the installed packages.
  467. ### Problems with flyspell-mode
  468. Prelude makes heavy use of the flyspell-mode package for spell
  469. checking of various things. The proper operation of flyspell depends
  470. on the presence of the `aspell` program and an `en` dictionary on your
  471. system. You can install `aspell` and the dictionary on OS X with
  472. `homebrew` like this:
  473. ```bash
  474. brew install aspell --with-lang=en
  475. ```
  476. On Linux distros - just use your distro's package manager.
  477. ### Ugly colors in the terminal Emacs version
  478. If your Emacs looks considerably uglier in a terminal (compared to the
  479. GUI version) try adding this to your `.bashrc` or `.zshrc`:
  480. ```bash
  481. export TERM=xterm-256color
  482. ```
  483. Source the `.bashrc` file and start Emacs again.
  484. ### MELPA error on initial startup
  485. If you get some http connection error related to the MELPA repo
  486. just do a manual `M-x package-refresh-contents` and restart Emacs
  487. afterwards.
  488. ### Warnings on arrow navigation in editor buffers
  489. This is not a bug - it's a feature! I firmly believe that the one true
  490. way to use Emacs is by using it the way it was intended to be used (as
  491. far as navigation is concerned at least).
  492. If you'd like to be take this a step further and disable the arrow key navigation
  493. completely put this in your personal config:
  494. ```lisp
  495. (setq guru-warn-only nil)
  496. ```
  497. To disable `guru-mode` completely add the following snippet to your
  498. personal Emacs config:
  499. ```lisp
  500. (setq prelude-guru nil)
  501. ```
  502. ### Customized C-a behavior
  503. Prelude overrides `C-a` to behave as described
  504. [here](http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beginning-of-a-line/). If
  505. you don't like that simply add this to your personal config:
  506. ```lisp
  507. (global-set-key [remap move-beginning-of-line]
  508. 'move-beginning-of-line)
  509. ```
  510. ### Poor ido matching performance on large datasets
  511. Prelude swaps the default `ido` flex matching with the more powerful
  512. [ido-flx](https://github.com/lewang/flx).
  513. The sorting algorithm `flx` uses is more complex, but yields better results.
  514. On slower machines, it may be necessary to lower `flx-ido-threshold` to
  515. ensure a smooth experience.
  516. ```lisp
  517. (setq flx-ido-threshold 1000)
  518. ```
  519. You can always disable the improved sorting algorithm all together like this:
  520. ```lisp
  521. (flx-ido-mode -1)
  522. ```
  523. ### Windows compatibility
  524. While everything in Prelude should work fine in Windows, I test it only
  525. with Linux & OS X, so there are Windows related problems from time to
  526. time. This situation will probably improve over time.
  527. ## Known issues
  528. Check out the project's
  529. [issue list](https://github.com/bbatsov/prelude/issues?sort=created&direction=desc&state=open)
  530. a list of unresolved issues. By the way - feel free to fix any of them
  531. and send me a pull request. :-)
  532. ## Support
  533. Support is available via several channels:
  534. * Prelude's Google Group <emacs-prelude@googlegroups.com>
  535. * Prelude's Freenode channel (`#prelude-emacs`)
  536. * [Gitter](https://gitter.im/bbatsov/prelude)
  537. ## Contributors
  538. Here's a [list](https://github.com/bbatsov/prelude/contributors) of all the people who have contributed to the
  539. development of Emacs Prelude.
  540. ## Bugs & Improvements
  541. Bug reports and suggestions for improvements are always
  542. welcome. GitHub pull requests are even better! :-)
  543. Cheers,<br/>
  544. [Bozhidar](https://twitter.com/bbatsov)
  545. [badge-license]: https://img.shields.io/badge/license-GPL_3-green.svg