Skip to content
This repository has been archived by the owner on Feb 11, 2018. It is now read-only.
Markus Bertheau edited this page Sep 15, 2015 · 20 revisions

Spacemacs FAQ

I wanted people who are new to Spacemacs quickly find answers to short questions, so I started this FAQ. As far as I know, so far no official Spacemacs FAQ exists. I hope eventually this document will be either replaced or merged into the official Spacemacs repo.

How do I install an Emacs package from github? #package #github

A: (since version 0.104) In .spacemacs add a line for the package to dotspacemacs-additional-packages like this:

dotspacemacs-additional-packages
'(
  (mypackage :location (recipe :fetcher github :repo "githubuser/mypackage"))
 )

Details: https://github.com/milkypostman/melpa#recipe-format

How do I rename a file that's tracked by git that I'm editing already? #file #rename #git

A: (since version 0.103) Use SPC : magit-file-rename.

How can I learn how to use spacemacs? #tutorial

A: Try SPC f e h and select the Spacemacs Starter Guide. If you're new to modal editing as popularized by vim, try the Evil Emacs Tutorial with SPC h T.

How do I use a function of a package in dotspacemacs/user-config before the package is loaded?

A: Wrap it in with-eval-after-load like this:

(with-eval-after-load 'helm (helm-autoresize-mode 1))

How do I set indentation or other settings per directory?

A: First, define a directory class with the settings you need:

(dir-locals-set-class-variables
 'machtfit '((nil . ((pyvenv-workon . "machtfit")
                     (fill-column . 100)
                     (flycheck-flake8rc . "tox.ini")))))

Then assign the directory class to the directory:

(dir-locals-set-directory-class
 "~/src/machtfit/" 'machtfit)

Pasting using p two and more times does strange things

A: This is the paste micro-state, cycling through your previous yanks. Details: https://github.com/syl20bnr/spacemacs/issues/2948

How do I clean the recent files list?

A: M-: (setq recentf-list nil)

Clone this wiki locally