Merging the HOW-TOs inside the FAQ allows to have a central place to look for information. It will also offer all HOW-TOs through the `SPC f e h` helm search.
10 KiB
- FAQ
- Common
- Which version of Spacemacs am I running ?
- What is the official pronunciation of Spacemacs ?
- Why are packages installed with
package-install
automatically deleted by Spacemacs when it boots ? - The Spacemacs banner is ugly, what should I do ?
- The powerline separators are ugly, how can I fix them ?
- The powerline separators have no anti-aliasing, what can I do ?
- Why is after-init-hook not executed ?
- What is the difference between
spacemacs-base
andspacemacs
distributions ? - How can I change or define an alias for an
evil-leader
prefix ? - Should I place my settings in
user-init
oruser-config
? - Why do some of my
org
-related settings cause problems?
- How do I
- Windows
- OS X
- Common
FAQ TOC@4
-
- Which version of Spacemacs am I running ?
- What is the official pronunciation of Spacemacs ?
- Why are packages installed with
package-install
automatically deleted by Spacemacs when it boots ? - The Spacemacs banner is ugly, what should I do ?
- The powerline separators are ugly, how can I fix them ?
- The powerline separators have no anti-aliasing, what can I do ?
- Why is after-init-hook not executed ?
- What is the difference between
spacemacs-base
andspacemacs
distributions ? - How can I change or define an alias for an
evil-leader
prefix ? - Should I place my settings in
user-init
oruser-config
? - Why do some of my
org
-related settings cause problems?
Common
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
.
What is the official pronunciation of Spacemacs ?
As it is written, that is space then macs.
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.
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.
The powerline separators are ugly, how can I fix them ?
Use the property :powerline-scale
of the variable dotspacemacs-default-font
.
See font section of the documentation for more details.
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 font section of the documentation.
Why is after-init-hook not executed ?
Don't launch Spacemacs with emacs -q -l init.el
command. This command will run
the hooked function in after-init-hook
before the evaluation of the passed -l
init.el
file.
What is the difference between spacemacs-base
and spacemacs
distributions ?
The distribution
concept was introduced in 0.104.x. You can now choose
between two distributions spacemacs
or spacemacs-base
.
spacemacs-base
contains only a minimal set of packages; whereas spacemacs
is the full Spacemacs experience.
Set the distribution with dotspacemacs-distribution
variable. The default is
spacemacs
. For more information as to what is included,
check out the packages.el
file in the respective folders in the
+distribution
folder of the layers/
directory.
How can I change or define an alias for an evil-leader
prefix ?
It is possible to change an evil-leader
prefix by binding its keymap to
another sequence. For instance, if you want to switch SPC l
(evil-avy-goto-line
) with SPC L
(perspectives
layer) to make the later
easier to reach, you can use:
(evil-leader/set-key
"l" (lookup-key evil-leader--default-map "L")
"L" 'evil-avy-goto-line)
Should I place my settings in user-init
or user-config
?
Any variable that layer configuration code will read and act on must be set
in user-init
, and any variable that Spacemacs explicitly sets but you wish to
override must be set in user-config
.
Anything that isn't just setting a variable should 99% be in user-config
.
Why do some of my org
-related settings cause problems?
Since version 0.104, spacemacs uses the `org` version from the org ELPA repository instead of the one shipped with emacs. Then, any `org` related code should not be loaded before `dotspacemacs/user-config`, otherwise both versions will be loaded and will conflict.
How do I
Disable a package completely?
To completely disable a package and effectively uninstalling it even if
it is part of your used layers, look for the variable
dotspacemacs-excluded-packages
in your dotfile and add the package
name to it:
(setq-default dotspacemacs-excluded-packages '(package1 package2 ...))
Disable a package only for a specific major-mode?
This is done by removing the hook added by Spacemacs. For example to
remove flycheck
support in python buffers, look for the function
dotspacemacs/user-config
in your dotfile and add the following code:
(remove-hook 'python-mode-hook 'flycheck-mode)
Hint to know the name of the major-mode of the current buffer press:
SPC h d v major-mode RET
Disable company for a specific major-mode?
It may be handy to disable company
for a given mode if you plan on
configuring auto-complete
instead. On easy way to do it is to use the
macro spacemacs|disable-company
in the function dotspacemacs/user-config
of your dotfile. The following snippet disables company for
python-mode
:
(spacemacs|disable-company python-mode)
Change special buffer rules?
To change the way spacemacs marks buffers as useless, you can customize
spacemacs-useless-buffers-regexp
which marks buffers matching the
regexp as useless. The variable spacemacs-useful-buffers-regexp
marks
buffers matching the regexp as useful buffers. Both can be customized
the same way.
Examples:
;; Only mark helm buffers as useless
(setq spacemacs-useless-buffers-regexp '("\\*helm\.\+\\*"))
;; Marking the *Messages* buffer as useful
(push "\\*Messages\\*" spacemacs-useful-buffers-regexp)
Enable navigation by visual lines?
Add the following snippet to your dostpacemacs/config
function:
;; Make evil-mode up/down operate in screen lines instead of logical lines
(define-key evil-motion-state-map "j" 'evil-next-visual-line)
(define-key evil-motion-state-map "k" 'evil-previous-visual-line)
;; Also in visual mode
(define-key evil-visual-state-map "j" 'evil-next-visual-line)
(define-key evil-visual-state-map "k" 'evil-previous-visual-line)
Disable evilification of a mode?
You can ensure a mode opens in emacs state by using evil-set-initial-state
.
(evil-set-initial-state 'magit-status-mode 'emacs)
You can also do this using buffer name regular expressions. E.g. for magit, which has a number of different major modes, you can catch them all with
(push '("*magit" . emacs) evil-buffer-regexps)
This should make all original magit bindings work in the major modes in
question. To enable the leader key in this case, you may have to define a
binding in the mode's map, e.g. for magit-status-mode
,
(define-key magit-status-mode-map
dotspacemacs-leader-key evil-leader--default-map)
Windows
Why do the fonts look crappy on Windows ?
You can install MacType on Windows to get very nice looking fonts. It is also recommended to disable smooth scrolling on Windows.
Why is there no Spacemacs logo in the startup buffer ?
Why are all packages unavailable?
Check if your Emacs has HTTPS capabilities by doing M-:
and then:
(gnutls-available-p)
If this returns nil
, you need to install the GnuTLS DDL file in the same
directory as Emacs. See here for instructions.
OS X
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 section in the README for more details.