A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
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.
Find a file
2015-03-27 23:37:33 -04:00
assets Add spacemacs icon asset 2015-03-12 23:51:43 -04:00
contrib racket layer: refactor and apply conventions 2015-03-27 23:37:33 -04:00
core Move rcirc and erc layer in irc subfolder 2015-03-27 22:27:58 -04:00
doc added support for highlight-indentation 2015-03-26 12:32:45 -04:00
private Fix bad Markdown markup in private/README 2015-03-20 23:37:47 -04:00
spacemacs Fix update of cursor color (temporary fix for #964) 2015-03-26 22:24:18 -04:00
travis Travis: Add symbolic link from local spacemacs repository to ~/.emacs.d 2015-01-22 23:16:35 -05:00
.gitignore Explicitly exclude private/snippets/README.md from ignored files 2015-01-29 00:35:14 -05:00
.gitmodules Remove evil-plugins submodule 2015-01-10 15:04:00 -05:00
.projectile Correct Projectile root file with syntax to exclude paths 2014-12-22 21:50:40 -05:00
.travis.yml Add travis directory with run_build.sh script 2015-01-22 23:02:41 -05:00
init.el Bump version to 0.100.1 2015-03-18 01:14:35 -04:00
README.md who -> whom in README.md 2015-03-26 12:40:09 -04:00


Spacemacs

| philosophy | goals | for whom? | screenshots | documentation | contribute | achievements | FAQ |


Build Status ![Gitter](https://badges.gitter.im/Join Chat.svg)Twitter


Quick Install:

git clone --recursive http://github.com/syl20bnr/spacemacs ~/.emacs.d

Table of Contents

Introduction

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.

Spacemacs is designed to be approachable for users coming from Vimyou do not need prior experience with Emacs to get started.

If you are already an experienced Emacs user, you will appreciate the elegantly customized system and carefully curated, tightly integrated, set of packages.

Spacemacs is currently in beta, and contributions are welcome.

Features

Batteries Included

Spacemacs integrates hundreds of packages and is ready to use with no additional configuration. It provides excellent support for many languages, including these:

It also ships with Git support and project management tools. All features are lazily loaded (on-demand) to minimize startup time.

The Spacemacs community provides additional configurations that extend this default distribution.

Visit the Documentation

Nice UI

Spacemacs looks good. It ships with quality themes and a minimalist modeline.

spacemacs_python

Excellent Evil Support

Spacemacs is designed around Vim keyboard bindings powered by Evil Mode. The core packages are customized to integrate seamlessly with Evil.

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.

Convenient and Mnemonic Key Bindings

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 chordsSpacemacs uses memorable bindings that are easy to type.

Great Documentation

Most of Spacemacs' features, key bindings, and configuration options are extensively documented.

If you need help, ask your question in the Gitter Chat and a member of the community will help you out.

Prerequisites

Emacs version

Spacemacs is tested with Emacs 24.3 and 24.4 and therefore should boot on all the major OSes where these versions are installable.

Some modes require third-party tools that you'll have to install via your favorite package manager.

OS X

The recommended version for OS X is emacs-mac-port. It can be installed via homebrew with the following commands:

$ brew tap railwaycat/emacsmacport
$ brew install emacs-mac

The default key handling is different from the official OS X port. To correct this you can add the osx layer to your dotfile layer list:

(setq-default dotspacemacs-configuration-layers '(osx))

Note that the emacs-mac-port server behaves differently than the regular Emacs server. Details can be found on the emacs-mac-port README.

Install

  1. If you have an existing Emacs configuration, back it up:

    cd ~
    mv .emacs.d .emacs.bak
    
  2. Clone this repository with its submodules:

    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.

If the mode-line turns red then be sure to visit the troubleshooting guide and consult the FAQ.

If you are using Ubuntu and Unity then you can add the Spacemacs logo by following the instructions here

Update

Spacemacs currently requires manual updates using the following procedure:

  1. Update Emacs packages by clicking (press RET) on the [Update] link of the starting page.

  2. Close Emacs and update the git repository:

    git pull --rebase
    git submodule sync; git submodule update
    
  3. Restart Emacs to complete the upgrade.

Update notification

For convenience an indicator is displayed in the mode-line whenever a new version of Spacemacs is available.

       Symbol                     | Description

:------------------------------------:|---------------------------------- git-new | < 3 releases behind git-del | < 5 releases behind git-mod | >= 5 releases behind

Note: A feature allowing update by merely clicking on the indicator will be implemented soon!

Rollback

Should anything go wrong during an update, you can rollback ELPA packages to a previous version. Click (press RET) on the [Rollback] link of the startup page, choose a rollback slot.

Rollback slot names are dates with the following format YYYY-MM-DD_HH.MM.SS. The date corresponds to the date of an update. The most recent slots are listed first.

Configuration

Spacemacs divides its configuration into self-contained units called configuration layers. These layers are stacked on top of each other to achieve a custom configuration.

Spacemacs uses the dotfile ~/.spacemacs to control which layers to load. Within this file you may also generally configure certain features.

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 using package.el
  • extensions.el: Configures packages which cannot be downloaded with package.el such as built-in Emacs features and git submodules.

If you already have your own Emacs configuration you can move it to your own layer.

The following command creates a layer in the private directory:

<SPC> : configuration-layer/create-layer RET

Any configuration layers you create must be explicitly loaded in ~/.spacemacs.

Note: 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.

Dotfile (.spacemacs)

As mentioned .spacemacs controls which configuration layers to load and is also a means to customizing Spacemacs.

The following command will create a .spacemacs file in your home directory:

<SPC> : dotspacemacs/install RET

...to open the installed dotfile:

<SPC> f e d

...to load some configuration layers using the variable dotspacemacs-configuration-layers:

;; List of configuration layers to load.
dotspacemacs-configuration-layers '(company-mode smex)

Some configuration layers support configuration variables to expose granular control over layer-specific features, git layer being one such example. Variables can be directly set within dotspacemacs-configuration-layers like so:

;; List of configuration layers to load.
dotspacemacs-configuration-layers '(company-mode
                                    (git :variables
                                         git-magit-status-fullscreen t
                                         git-enable-github-support t
                                         git-gutter-use-fringe t)
                                    smex)

At anytime you can apply the changes made to the dotfile without restarting Spacemacs by pressing SPC m c c.

The comments in this file contain further information about how to customize Spacemacs. See the dotfile configuration section of the documentation for more details.

Learning Spacemacs

Evil-tutor

Press SPC h T to begin an Evil-adapted Vimtutor.

The leader key

Spacemacs key bindings use a leader key which is by default bound to SPC (space bar).

Change it by setting the variable dotspacemacs-leader-key in ~/.spacemacs.

Universal argument

In Spacemacs the universal argument defaults to <SPC> u instead of C-u because the latter is used to scroll up as in Vim.

Configuration layers and Package discovery

By using helm-spacemacs with SPC f e h you can quickly search for a package and get the name of the layers using it.

You can also easily go to the README.md of a layer or go to the initialization function of a package.

Key bindings discovery

Thanks to guide-key, whenever a prefix command is pressed (like <SPC>) a buffer appears after one second listing the possible keys for this prefix.

It is also possible to search for specific key bindings by pressing:

<SPC> ?

To narrow the bindings list to those prefixed with <SPC>, type a pattern like this regular expression:

SPC\ b

which would list all buffer related bindings.

Describe functions

Describe functions are powerful Emacs introspection commands to get information about functions, variables, modes etc. These commands are bound thusly:

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!

We especially need to create more configuration layers that, for instance, bring support for new languages.

If you are ready to contribute please begin by consulting the contribution guidelines, thanks!

Credits

Spacemacs logo by Nasser Alshammari released under a Creative Commons license.

FAQ

Common

  1. Which version of Spacemacs am I running ? The version is displayed on the upper right corner of the loading screen. You may also just type SPC f e v.

  2. Why are packages installed with package-install automatically deleted by Spacemacs when it boots ? To declare new packages you have to create a new configuration layer, see the quick start guide.

  3. The Spacemacs banner is ugly, what should I do ? Install the default font supported by Spacemacs or choose a fixed width font. More information in the font section of the documentation.

  4. The powerline separators are ugly, how can I fix them ? Use the property :powerline-scale of the variable dotspacemacs-default-font. See [font][] documentation for more details.

  5. The powerline separators have no anti-aliasing, what can I do ? Emacs powerline uses XMP images to draw the separators in a graphical environment. You can have anti-aliasing if you use the utf8 separator. Note that by default the utf8 separator is used in a terminal. See the powerline section in the documentation.

Windows

  1. Why do the fonts on Windows looks so crappy ? You can install MacType on Windows to get very nice looking fonts. It is also recommended to disable smooth scrolling on Windows.

  2. How to fix the error: The directory ~/.emacs.d/server is unsafe ? Change the owner of the directory ~/.emacs.d/server:

  • from Properties select the Tab “Security”,
  • select the button “Advanced”,
  • select the Tab “Owner”
  • change the owner to your account name Source: Stackoverflow

OS X

  1. Why are the powerline colors not correct on OS X ? This is a known issue as of Emacs 24.4 due to ns-use-srgb-colorspace defaulting to true. It is recommended to use the emacs-mac-port build. See the install OSX section for more details.