Beruflich Dokumente
Kultur Dokumente
bbatsov/prelude
PUBLIC
This repository
Explore
Gist
Blog
Help
yawo
Watch
bbatsov / prelude
139
Star
Prelude is an enhanced Emacs 24 distribution that should make your experience with Emacs both more
pleasant and more powerful.
874 commits
branch: master
2 branches
0 releases
Fork
Issues
719
33
Pull Requests
Wiki
Code
67 contributors
prelude /
1,531
core
modules
personal
sample
Add Go module
24 days ago
themes
2 years ago
utils
20 days ago
vendor
.gitignore
.projectile
CONTRIBUTING.md
2 years ago
README.md
24 days ago
init.el
a month ago
Pulse
20 days ago
3 days ago
7 months ago
Graphs
Network
HTTPS clone URL
https://github.com/b
batsov/prelude
You can clone with HTTPS, SSH,
or Subversion.
a year ago
Clone in Desktop
a month ago
7 months ago
Download ZIP
README.md
license GPL3
tips $11/week
Emacs 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.x. In general you're advised to always run Prelude with the
latest Emacs - currently 24.3.
Table of Contents
Fast Forward
Installing Emacs 24
Installation
Automated
Via Curl
Via Wget
Manual
Updating Prelude
Manual update
Update all bundled packages
Update Prelude's code
Restart Prelude
https://github.com/bbatsov/prelude
1/11
6/28/2014
bbatsov/prelude
Automatic update
Enabling additional modules
Running
Getting to know Prelude
Keymap
Global
Prelude Mode
OSX modifier keys
Projectile
Key-chords
Disabling key-chords
Automatic package installation
Color Themes
Personalizing
Disabling whitespace-mode
Disable flyspell-mode
Caveats & Pitfalls
Updating bundled packages
Problems with flyspell-mode
Ugly colors in the terminal Emacs version
MELPA error on initial startup
No arrow navigation in editor buffers
Customized C-a behavior
Poor ido matching performance on large datasets
Windows compatibility
Known issues
Support
Contributors
Bugs & Improvements
Fast Forward
Assuming you're using an Unix-like OS (
installed, as well as
git
&
curl
you can skip the whole manual and just type in your favorite shell the
following command:
curl -L http://git.io/epre | sh
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:
export PRELUDE_INSTALL_DIR="$HOME/.emacs.d" && curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh
.emacs
file or
.emacs.d
.emacs
directory manually.
prelude-modules.el
Installing Emacs 24
Obviously to use the Emacs Prelude you have to install Emacs 24 first. Have a look at the WikEmacs articles
on installing Emacs.
https://github.com/bbatsov/prelude
2/11
6/28/2014
bbatsov/prelude
Installation
Automated
You can install Emacs Prelude via the command line with either
curl
or
wget .
Naturally
git
is also required.
Via Curl
If you're using
curl
curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
Via Wget
If you're using
wget
type:
Manual
git clone git://github.com/bbatsov/prelude.git path/to/local/repo
ln -s path/to/local/repo ~/.emacs.d
cd ~/.emacs.d
~/.emacs.d
C-h v user-emacs-directory
user-emacs-directory
inside Emacs.
Updating Prelude
Manual update
The update procedure is fairly straightforward and consists of 3 steps:
The
path/to/prelude/installation
is usually
~/.emacs.d
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 M-x prelude-update from Emacs itself and restart Emacs afterwards.
https://github.com/bbatsov/prelude
3/11
6/28/2014
bbatsov/prelude
(require 'prelude-c)
;; (require 'prelude-clojure)
;; (require 'prelude-coffee)
;; (require 'prelude-common-lisp)
;; (require 'prelude-css)
(require 'prelude-emacs-lisp)
(require 'prelude-erc)
;; (require 'prelude-erlang)
;; (require 'prelude-haskell)
(require 'prelude-js)
;; (require 'prelude-latex)
(require 'prelude-lisp)
;; (require 'prelude-mediawiki)
(require 'prelude-org)
(require 'prelude-perl)
;; (require 'prelude-python)
;; (require 'prelude-ruby)
;; (require 'prelude-scala)
(require 'prelude-scheme)
;; (require 'prelude-scss)
;; (require 'prelude-web)
(require 'prelude-xml)
prelude-modules.el
file once the installation is done. If you are doing a manual install
prelude-modules.el
path/to/prelude/installation
After you've uncommented a module you should either restart Emacs or evaluate the module
require
Running
Nothing fancy here. Just start Emacs as usual. Personally I run Emacs in daemon mode:
emacs --daemon
Afterwards I connect to the server with either a terminal or a GUI client like this:
emacsclient -t
emacsclient -c
.zshrc
(or
.bashrc ):
The last two aliases are helpful if you're used to editing files from the command line using
vi(m) .
prelude-mode
added by Prelude. It also adds an additional keymap that binds many of those extensions to keybindings.
Keymap
Global
Keybinding
C-M-h
C-x
Description
Kill the previous word(
backward-kill-word ).
(as in Bash/Zsh)
align-regexp
https://github.com/bbatsov/prelude
4/11
6/28/2014
bbatsov/prelude
C-+
C--
C-x O
C-^
C-x p
Start
proced
C-x m
Start
eshell .
C-x M-m
C-x C-m
Alias for
C-h A
Run
C-h C-m
Display key bindings of current major mode and descriptions of every binding.
M-/
Run
C-x C-b
Open
F11
F12
C-x g
C-=
Run
expand-region
C-a
Run
prelude-move-beginning-of-line .
text-scale-increase ).
text-scale-decrease ).
other-window
C-x o )).
prelude-top-join-line ).
M-x .
apropos
hippie-expand
ibuffer
dabbrev-expand ).
buffer-list ).
Prelude Mode
Keybinding
Description
C-c o
C-c i
C-c g
Search in Google for the thing under point (or an interactive query).
C-c G
Search in GitHub for the thing under point (or an interactive query).
C-c y
Search in YouTube for the thing under point (or an interactive query).
C-c U
Search in Duckduckgo for the thing under point (or an interactive query).
C-S-RET or Super-o
Insert an empty line above the current line and indent it properly.
S-RET or M-o
C-S-up or M-S-up
C-S-down or M-Sdown
C-c n
C-c f
C-M-
C-c u
C-c e
Eval a bit of Emacs Lisp code and replace it with its result.
C-c s
C-c D
C-c d
C-c M-d
https://github.com/bbatsov/prelude
5/11
6/28/2014
bbatsov/prelude
C-c r
C-c t
C-c k
Kill all open buffers except the one you're currently in.
C-c TAB
C-c h
C-c I
C-c S
C-c . +
C-c . -
C-c . *
C-c . /
C-c . </kbd>
C-c . ^
C-c . <
C-c . >
C-c . #
C-c . %
C-c . '
ansi-term ).
prelude-helm
module).
Super-r
Recent files
Super-x
Expand region
Super-j
Join lines
Super-k
Super-m m
Magit status
Super-m l
Magit log
Super-m f
Super-m b
C-c .
+ , - , * , / ...
needs to be pressed).
Command
(to
Super )
and
Option
(to
Meta ).
C-c w
M-x prelude-swap-meta-and-super ).
Projectile
Here's a list of functionality provided by Projectile:
Keybinding
https://github.com/bbatsov/prelude
Description
6/11
6/28/2014
bbatsov/prelude
C-c p f
C-c p d
Display a list of all files in the project. With a prefix argument it will clear the cache first.
Display a list of all directories in the project. With a prefix argument it will clear the cache
first.
C-c p T
C-c p g
C-c p b
C-c p o
Runs
C-c p r
C-c p i
C-c p R
C-c p k
C-c p D
C-c p e
C-c p a
Runs
C-c p c
C-c p p
C-c p z
C-c p s
multi-occur
ack
file.
TAGS
dired .
ack-and-a-half .
Command
Super-f
Super-d
Super-g
Super-p
Switch projects
Key-chords
Key-chords are available only when the
Keybinding
prelude-key-chord
Description
jj
jk
Jump to a character(
jl
JJ
uu
xx
yy
ace-jump-word-mode )
ace-jump-char-mode )
ace-jump-line-mode )
prelude-switch-to-previous-buffer )
undo-tree-visualize )
execute-extended-command )
browse-kill-ring )
Disabling key-chords
https://github.com/bbatsov/prelude
7/11
6/28/2014
bbatsov/prelude
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
personal.el
nil .
jj
key-chord
If you're an
evil-mode
key-chord-mode
altogether:
(key-chord-mode -1)
vim emulation
If you want to use vim inside of emacs enable the
prelude-evil
evil-mode .
.clj
file
and Prelude's enhanced Lisp configuration will be installed automatically for you.
Color Themes
Emacs 24 ships with a new theming facility that effectively renders the old color-theme package obsolete.
Emacs 24 provides a dozen of built-in themes you can use out-of-the-box by invoking the
M-x load-theme
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:
(disable-theme 'zenburn)
P.S. Solarized is not available by default - you'll have to install it from MELPA first (
solarized-theme ).
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:
(prelude-require-packages '(some-package some-other-package))
personal/preload
https://github.com/bbatsov/prelude
directory. Note that at this point you can't using anything from
prelude-dir ,
8/11
6/28/2014
bbatsov/prelude
Disabling whitespace-mode
Although
whitespace-mode
is awesome some people might find it too intrusive. You can disable it in your
If you like
whitespace-mode
but prefer it to not automatically cleanup your file on save, you can disable that
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:
(setq prelude-flyspell nil)
M-x prelude-update ,
packages.
aspell
aspell
program and an
homebrew
en
like this:
or
.zshrc :
export TERM=xterm-256color
Source the
.bashrc
M-x package-refresh-
9/11
6/28/2014
bbatsov/prelude
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). That's why I've disabled all movement
commands with arrows (and keys like page up, page down, etc) - to prevent you from being tempted to use
them.
If you'd like to be able to use the arrow keys (but still be reminded of the alternatives) put this in your personal
config:
(setq guru-warn-only t)
To disable
guru-mode
C-a
to behave as described here. If you don't like that simply add this to your personal
config:
(global-set-key [remap move-beginning-of-line]
'move-beginning-of-line)
ido
flx
flx-ido-threshhold
You can always disable the improved sorting algorithm all together like this:
(flx-ido-mode -1)
Windows compatibility
While everything in Prelude should work fine in Windows, I test it only with Linux & OSX, 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 emacs-prelude@googlegroups.com.
There's also a Freenode channel you can visit -
#prelude-emacs .
Contributors
Here's a list of all the people who have contributed to the development of Emacs Prelude.
10/11
6/28/2014
bbatsov/prelude
Bug reports and suggestions for improvements are always welcome. GitHub pull requests are even better! :-)
I'm also accepting financial contributions via gittip.
Cheers,
Bozhidar
Terms
Privacy
https://github.com/bbatsov/prelude
Security
Contact
Status
API
Training
Shop
Blog
About
11/11