Difference between revisions of "Prelude"

From WikEmacs
Jump to navigation Jump to search
(10 intermediate revisions by 8 users not shown)
Line 2: Line 2:
 
|name=Emacs Prelude
 
|name=Emacs Prelude
 
|description=Advanced Emacs config
 
|description=Advanced Emacs config
|maintainer=Bozhidar Batsov
+
|author=[[User:Bozhidar|Bozhidar Batsov]]
 +
|maintainer=[[User:Bozhidar|Bozhidar Batsov]]
 
|source=https://github.com/bbatsov/prelude
 
|source=https://github.com/bbatsov/prelude
 
}}
 
}}
Line 8: Line 9:
 
'''Prelude''' has the goal to ease the initial Emacs setup process and to provide you with a much more powerful and productive experience than that you get out of the box. By using Emacs Prelude you're basically getting a "Get me out of the Prelude, I just want to use Emacs" card.
 
'''Prelude''' has the goal to ease the initial Emacs setup process and to provide you with a much more powerful and productive experience than that you get out of the box. By using Emacs Prelude you're basically getting a "Get me out of the Prelude, I just want to use Emacs" card.
  
Emacs Prelude is compatible ONLY with GNU Emacs 24. While Emacs 24 is not yet officially released it's a rock solid piece of software more than suitable for everyday work. There is no good excuse not to use Emacs 24!
+
Emacs Prelude is compatible ONLY with GNU Emacs 24.
  
 
= Basic setup =
 
= Basic setup =
Line 15: Line 16:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
+
# curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
 +
# You really should not be running commands from an anonymously editable wiki
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 33: Line 35:
  
 
You can tweak Prelude's config by adding '''.el''' files under the
 
You can tweak Prelude's config by adding '''.el''' files under the
'''personal''' directory.
+
'''personal''' directory. All files ending in ".el" will be read automatically when emacs starts up.
 +
 
 +
== Re-enable the arrow keys ==
 +
 
 +
Arrow keys for navigation are turned off by default.  This is to get people to use the preferred Emacs defaults. To re-enable them, add the following to a file in your personal directory:
 +
 
 +
<syntaxhighlight lang="lisp">
 +
(defun disable-guru-mode ()
 +
  (guru-mode -1)
 +
)
 +
(add-hook 'prelude-prog-mode-hook 'disable-guru-mode t)
 +
</syntaxhighlight>
 +
 
 +
== Turn off whitespace mode ==
 +
 
 +
Prelude adds a lot of functionality from whitespace mode, including line-ending markers, highlighting of long-lines, space visualization.  If you find these distracting, add the following to a file in your personal directory:
 +
 
 +
<syntaxhighlight lang="lisp">
 +
(add-hook 'prog-mode-hook 'prelude-turn-off-whitespace t)
 +
</syntaxhighlight>
  
 
== Change the default theme  ==
 
== Change the default theme  ==
Line 60: Line 81:
 
= [[Windows]] =
 
= [[Windows]] =
 
<!-- Customization/Notes specific to Windows goes here -->
 
<!-- Customization/Notes specific to Windows goes here -->
 +
Note: on Windows 7 (Enterprise),
 +
 +
ln -s <prelude-directory> ~/emacs.d
 +
 +
did not work. But copying the content of prelude directory to .emacs.d worked as expected.
  
 +
Note: it also expects git to be on the system paths defined in PATH. I used git from Cygwin. It worked.
  
 
= See Also =
 
= See Also =
Line 71: Line 98:
 
* [http://batsov.com/prelude Project Page]
 
* [http://batsov.com/prelude Project Page]
 
* [http://github.com/bbatsov/prelude GitHub]
 
* [http://github.com/bbatsov/prelude GitHub]
 +
* [http://github.com/bbatsov/prelude-modules Add-ons for Prelude]
  
 
<!------------------------------------------------------------------------->
 
<!------------------------------------------------------------------------->

Revision as of 11:09, 12 March 2013

Emacs Prelude
Description Advanced Emacs config
Author Bozhidar Batsov
Maintainer Bozhidar Batsov
Source https://github.com/bbatsov/prelude

Prelude has the goal to ease the initial Emacs setup process and to provide you with a much more powerful and productive experience than that you get out of the box. By using Emacs Prelude you're basically getting a "Get me out of the Prelude, I just want to use Emacs" card.

Emacs Prelude is compatible ONLY with GNU Emacs 24.

Basic setup

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

# curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
# You really should not be running commands from an anonymously editable wiki

You can now power up your Emacs, sit back and enjoy Prelude.

Helpful keybindings

[C-c f]
Find a recently accessed file.
[C-c r]
Rename file and buffer.

Common Customization

You can tweak Prelude's config by adding .el files under the personal directory. All files ending in ".el" will be read automatically when emacs starts up.

Re-enable the arrow keys

Arrow keys for navigation are turned off by default. This is to get people to use the preferred Emacs defaults. To re-enable them, add the following to a file in your personal directory:

(defun disable-guru-mode ()
  (guru-mode -1)
)
(add-hook 'prelude-prog-mode-hook 'disable-guru-mode t)

Turn off whitespace mode

Prelude adds a lot of functionality from whitespace mode, including line-ending markers, highlighting of long-lines, space visualization. If you find these distracting, add the following to a file in your personal directory:

(add-hook 'prog-mode-hook 'prelude-turn-off-whitespace t)

Change the default theme

Emacs Prelude uses the Zenburn theme by default, but you can easily change this:

(load-theme 'solarized-dark t)


GNU/Linux

OS X

Windows

Note: on Windows 7 (Enterprise),

ln -s <prelude-directory> ~/emacs.d

did not work. But copying the content of prelude directory to .emacs.d worked as expected.

Note: it also expects git to be on the system paths defined in PATH. I used git from Cygwin. It worked.

See Also

Emacs Starter Kit


Project Pages


Tutorial Pages