This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/README.md

267 lines
9.6 KiB
Markdown
Raw Normal View History

2014-10-13 03:56:29 +00:00
![title](https://raw.githubusercontent.com/syl20bnr/spacemacs/master/doc/title.png)
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/syl20bnr/spacemacs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![Twitter][]](http://www.twitter.com/spacemacs)
2014-09-21 23:58:53 +00:00
2014-11-22 06:31:33 +00:00
[philosophy][] | [goals][] | [for who?][] | [screenshots][] | [achievements][] | [contribute][CONTRIBUTE.md] | [documentation][DOCUMENTATION.md]
2013-11-24 04:00:41 +00:00
2014-11-24 03:42:31 +00:00
**Quick Install:**
git clone --recursive http://github.com/syl20bnr/spacemacs ~/.emacs.d
# Introduction
2014-10-16 17:03:17 +00:00
`Spacemacs` is a user-friendly and well-documented Emacs kit that integrates the
best Emacs packages out there. It uses [Evil Mode][] to combine the ergonomic
editing features of Vim with the extensibility of Emacs.
2014-10-16 17:03:17 +00:00
Spacemacs is designed to be approachable to users coming from Vim--you do not
need any prior experience with Emacs to get started.
2014-10-16 17:03:17 +00:00
If you are already an experienced Emacs user, you will appreciate the clean
customization system and tight integration of the included packages.
2014-10-16 17:03:17 +00:00
Spacemacs is currently in beta, and contributions are welcome.
2014-10-16 17:03:17 +00:00
2014-10-18 01:55:28 +00:00
And now, to use a well known catch line from [Emacs Live][emacs_live]:
2014-10-16 17:03:17 +00:00
M-x start-spacing !
2014-11-22 21:53:38 +00:00
# Features
### Batteries Included
2014-11-22 21:53:38 +00:00
Spacemacs integrates hundreds of packages and is ready to use with no additional
configuration. It provides excellent support for many languages, including the
following:
2014-11-22 21:53:38 +00:00
- Elixir
- Haskell
- JavaScript
- LaTex
- Python
- R
- Ruby
- SCSS
- Scala
2014-11-22 21:53:38 +00:00
It also comes with [Git support][] and [project management][] tools. All these
features are loaded on-demand to keep startup time short.
2014-11-22 21:53:38 +00:00
The Spacemacs community provides [additional configurations][contrib layers]
that extend the default distribution.
2014-11-22 21:53:38 +00:00
**[Visit the Documentation][DOCUMENTATION.MD]**
2014-11-22 21:53:38 +00:00
### Nice UI
2014-11-22 21:53:38 +00:00
Spacemacs looks good. It comes with high-quality themes and a custom low-clutter
modeline.
2014-11-22 21:53:38 +00:00
![spacemacs_python](https://raw.githubusercontent.com/syl20bnr/spacemacs/master/doc/spacemacs-python.png)
2014-11-22 21:53:38 +00:00
### Excellent Evil Support
2014-11-22 21:53:38 +00:00
Spacemacs is designed around Vim keyboard bindings, provided by [Evil Mode][].
The packages distributed with Spacemacs are customized to integrate seamlessly
with Evil.
2014-11-22 21:53:38 +00:00
Spacemacs improves upon Vim by using task-specific states to group related
commands. These states reduce the keystrokes needed to issue repetitive commands
and reduce the number of keyboard bindings to learn.
2014-11-22 21:53:38 +00:00
### Convenient and Mnemonic Key Bindings
2014-11-22 21:53:38 +00:00
`Spacemacs` organizes key bindings into mnemonic groups. For example, commands
to operate on the buffer are prefixed by `<SPC> b`, and commands to operate on
the project are under `<SPC> p`.
There is no need to learn convoluted Emacs key chords--Spacemacs uses memorable
bindings that are easy to type.
### Great [Documentation][DOCUMENTATION.MD]
Most of Spacemacs' features are extensively documented, along with key bindings
and configuration options.
If you need help, ask your question in the [Gitter Chat][] and a member of the community
will help you out.
2014-11-22 21:53:38 +00:00
# Prerequisites
2014-09-27 02:50:30 +00:00
`Spacemacs` is tested with Emacs 24.3 and 24.4. It should boot on all the major
OSes where these versions can be installed.
2013-11-23 05:46:33 +00:00
Some modes require third-party tools that you'll have to install via your
favorite package manager.
# Install
2013-11-23 05:46:33 +00:00
1. If you have an existing Emacs configuration, back it up:
```sh
cd ~
mv .emacs.d .emacs.bak
```
2013-11-23 05:46:33 +00:00
2. Clone this repository _with its submodules_:
```sh
git clone --recursive http://github.com/syl20bnr/spacemacs ~/.emacs.d
```
`master` is the stable branch and is regularly updated. Switch to the `develop`
branch if you want to use the bleeding-edge version.
3. Launch Emacs. Spacemacs will automatically install the packages it requires.
4. Restart Emacs to complete the installation.
See the [troubleshooting][troubleshoot] guide if you have any issues.
# Update
Spacemacs currently requires manual updates using the following procedure:
1. Update Emacs packages.
1. Open the package list using `<SPC> a P` or `M-x paradox-list-packages`
2. Mark all packages for updating by pressing `U`, and
3. install them with `x`.
[See the documentation][using_package_buf] for more information about how to use
the package list.
2. Close Emacs and update the git repository:
```sh
git pull --rebase
git submodule sync; git submodule update
```
3. Restart Emacs to complete the upgrade.
# Configuration
`Spacemacs` divides its configuration into self-contained units called
[configuration layers][config]. It uses a dotfile, `~/.spacemacs`, to control
which of these features to enable.
## Configuration layers
A configuration layer is a directory containing at least the following files:
- `packages.el`: Defines and configures packages to be downloaded from Emacs package repositories
- `extensions.el`: Configures packages that do not need to be downloaded with
the package manager, such as built-in Emacs features and git submodules.
You should create your own configuration layers in the [private][] directory.
The following command automates this process:
<SPC> : config-system/create-layer RET
_Caveat:_ For your privacy, the contents of the `private` directory are not
under source control. See the documentation for a discussion on how to
[manage your private configuration][manage_config].
Any configuration layers you create must be explicitly loaded in your
`~/.spacemacs` file.
## Dotfile (.spacemacs)
The `.spacemacs` file controls which features to load and provides a way to
customize Spacemacs' loading sequence.
The following command will create `.spacemacs` in your home directory:
<SPC> : dotspacemacs/install RET
To load configuration layers, add them to the list beside
`dotspacemacs-configuration-layers`:
```lisp
;; List of configuration layers to load.
dotspacemacs-configuration-layers '(company-mode smex)
```
The comments in this file contain further information about how to customize
Spacemacs. See the [dotfile configuration][dotfile] section of the documentation
for more information.
# Learning Spacemacs
2014-10-29 14:02:28 +00:00
## Universal argument
In spacemacs the universal argument is by default on `<SPC> u` instead of `C-u`
which is used to scroll up as in Vim.
## Key bindings discovery
2014-10-29 14:02:28 +00:00
Thanks to [guide-key][], whenever a prefix command is pressed (like `<SPC>`)
2014-11-24 03:58:24 +00:00
a buffer appears after one second listing the possible keys for this prefix.
2014-10-31 04:42:04 +00:00
2014-11-24 03:58:24 +00:00
It is also possible to search for specific key bindings by pressing:
2014-10-29 14:02:28 +00:00
<SPC> ?
2014-11-24 03:58:24 +00:00
To narrow the list to `Spacemacs` key bindings starting with prefix `<SPC>`,
set the pattern to something like the regular expression:
2014-10-29 14:02:28 +00:00
SPC\ b
2014-10-29 14:02:28 +00:00
The example above will list all the `buffer` related bindings.
## Describe functions
2014-11-24 03:58:24 +00:00
`Describe functions` are powerful Emacs introspection commands to get information
about functions, variables, modes and so on.
2014-10-29 14:02:28 +00:00
These functions are accessible with the following bindings:
2014-10-29 14:02:28 +00:00
Key Binding | Description
--------------|------------------------------------------------------------------
`<SPC> h d f` | describe-function
`<SPC> h d k` | describe-key
`<SPC> h d m` | describe-mode
`<SPC> h d v` | describe-variable
# Contributions
`Spacemacs` needs you!
Especially to grow the number of configuration layers, for instance to support new languages.
If you are ready to contribute please consult the [contribution guidelines][CONTRIBUTE.md]
first.
2014-12-01 02:17:12 +00:00
# FAQ
- Why manually installed packages with `package-install` are automatically
deleted by `Spacemacs` when it starts ?
To declare new packages you have to create a new configuration layer, see
the quick start guide [here](https://github.com/syl20bnr/spacemacs#configuration).
2014-11-19 04:47:30 +00:00
[Twitter]: http://i.imgur.com/tXSoThF.png
[philosophy]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#philosophy
[goals]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#goals
[for who?]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#who-can-benefit-from-this-
[screenshots]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#screenshots
[config]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#configuration-layers
[dotfile]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#dotfile-configuration
[manage_config]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#managing-private-configuration-layers
2014-12-03 04:41:06 +00:00
[using_package_buf]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#using-the-package-list-buffer
[achievements]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#achievements
[troubleshoot]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#troubleshoot
2014-11-22 21:53:38 +00:00
[contrib layers]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#using-configuration-layers
[Git support]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#working-with-git
[ace-jump]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#vim-motions-with-ace-jump-mode
[project management]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#project-management
[Evil Mode]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md#evil
2014-11-22 05:53:13 +00:00
[private]: https://github.com/syl20bnr/spacemacs/tree/master/private
[DOCUMENTATION.md]: https://github.com/syl20bnr/spacemacs/blob/master/DOCUMENTATION.md
[CONTRIBUTE.md]: https://github.com/syl20bnr/spacemacs/blob/master/CONTRIBUTE.md
2014-10-16 17:03:17 +00:00
[emacs_live]: https://github.com/overtone/emacs-live
2014-10-31 04:42:04 +00:00
[guide-key]: https://github.com/kai2nenobu/guide-key
[guide-key-tip]: https://github.com/aki2o/guide-key-tip
2014-11-22 21:53:38 +00:00
[evil-lisp-state]: https://github.com/syl20bnr/evil-lisp-state
[evil-nerd-commenter]: https://github.com/redguardtoo/evil-nerd-commenter
[Gitter Chat]: https://gitter.im/syl20bnr/spacemacs