Spacemacs App Icon Mac
Edit: Some things in this post are now outdated. I’m currently using Sublime Text with Vim keybindings instead of Spacemacs so I haven’t been keeping up. I’ve fixed some things (Thanks Fabien!) but others may remain. If you want to fix something outdated submit a PR to my website.
A few months ago I switched to using Spacemacs as my text editor of choice. It has great vim keybindings and extensive default configs for a variety of packages. I’ve become one of the top contributors to Spacemacs and I’ve learned a few things about configuring it in the process. This post will function as a tutorial to get you started with configuring Spacemacs to your liking.
You can get started using Spacemacs by following the installation instructions in the readme and perusing the in-depth documentation.
The ~/.spacemacs
file is your main starting point for configuring Spacemacs. If you don’t have this file you can install a template pressing SPC : dotspacemacs/install RET
in Spacemacs, where SPC
is space and RET
is the enter key. At any time you can press SPC f e d
to edit this file.
Tested on OS X 10.11 El Capitan, with Homebrew Emacs and Spacemacs config. Why Emacs Daemon, why this post. Installing Emacs on a Mac in and of itself is not that much of a problem - there are several options, ranging from Homebrew and Macports to Emacs for Mac OS X, Emacs Mac Port and Aquamacs. The last two in this list have some OS X. Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share. Recently I really got into using Spacemacs and I like it a lot. With the next release this great Emacs configuration has an official logo. So I thought that it would be a good idea to use it as an Icon.
The template comes with many variables that you can customize and use to set things like font sizes and window preferences. Once you are done editing, save the file and either press SPC f e R
in the file to reload it or just restart Spacemacs.
Some parts of this file are more important than others:
dotspacemacs/user-config
This function is run after Spacemacs sets itself up, in here you can customize variables and activate extra functionality you want. Perhaps the most important thing to know is that this is generally where you can paste random snippets of Emacs Lisp you find on the internet. If a page says to put a snippet into your init.el
file don’t do that, put it in dotspacemacs/user-config
instead.
Another thing this function is useful for is setting the default state of some toggleable editor preferences. If you press SPC t
you will see some of the things you can toggle, these include line numbers, line wrapping, current line highlight, etc…
Most of these toggles actually enable and disable “minor modes”, if you want some of these on or off by default you can put things like these in your dotspacemacs/user-config
function:
dotspacemacs-configuration-layers
This brings us to configuration layers the most core concept of Spacemacs. Not all parts of Spacemacs are enabled by default, there are a large number of user contributed “layers” that add packages and configs for things like programming languages, external tools and extra functionality. Layers specify which packages they want Spacemacs to install for them, how to load the package and often include some default configs to make the package integrate well with the rest of Spacemacs.
The dotspacemacs-configuration-layers
variable, set in the dotspacemacs/layers
function near the top of the template is where you specify which layers you want to include. When you find yourself wondering “does Spacemacs come with support for X?” you can simply type SPC f e h
and search through the built in layers. Once you find one you want to include simply include it in the list in the variable set statement. This is what mine looks like:
Yah, I use a lot of layers; you should too, they’re pretty important! You can see staples like “html” and “ruby” as well as fancier functionality ones like “company-mode”. Try looking through the “layers” directory to see all the available contributed layers and their Readme’s and source code.
You too could be the author of your very own layer! In fact, you’ll likely find you want to after you have used Spacemacs for a while. The most important purpose of layers is adding MELPA packages and the configuration and keybindings for them. Don’t try and just install packages with the default Emacs package manager like the internet might tell you to do!
If you want to install a package you found online, like 2048-game, you’ll want to create a layer that includes the package and sets it up. /open-list-of-open-apps-on-mac.html. Another option for small things is to add the package to the dotspacemacs-additional-packages
list. There are a couple of places you can put this layer, which is really just a folder with some emacs lisp files:
The “private” Directory
This is a folder in the main Spacemacs directory where you can put configuration layers for your own personal use.You can create a template layer in this directory using <SPC> : configuration-layer/create-layer RET
.
The descriptive comments in the template packages.el
do a pretty good job of explaining what to do. Basically you add the package you want to include to the yourlayernamehere-packages
list and then create yourlayernamehere-init-yourpackagenamehere
functions where you use use-package to load the package and set it up. Take a look at existing layers for examples of how to set up packages and keybindings.
Once you have written a layer you have to load it in .spacemacs just like any other layer. Add your layer’s name to dotspacemacs-configuration-layers
.
dotspacemacs-configuration-layer-path
If you want to keep your layers in a git repository or Dropbox sync or some other folder, you can use the dotspacemacs-configuration-layer-path
variable in .spacemacs
to set another folder where you can load layers from. Then you can just copy the layer directory that Spacemacs puts in the private directory into this directory and Spacemacs will be able to load it from there.
The “contrib” Directory
If you are adding some awesome new functionality to Spacemacs, which you probably are, you should seriously consider contributing it back. This is how Spacemacs has grown into the awesome distribution that it is. Don’t worry about people finding it hacky or not useful, we won’t mind and might even help you make it better.
This is what I do, I’m proud to say that I only have 1 private layer, everyotherlayerI’vewritten has been contributed back to Spacemacs. It’s as simple as forking Spacemacs, adding your layer to contrib
and submitting a Github pull request.
Tips For Writing Layers
There’s a couple things that are nice to know when writing layers. The most important thing to know is some of the features of use-package. You use this in the init functions in packages.el
to load the package and set it up. The function takes a package name and some attributes containing things like functions to run on load. You use use-package instead of doing whatever loading step the package readme tells you to do, generally you don’t include things like (require 'blah)
.
Basic Format
Things that aren’t packages
If you want to bundle up some snippet or config that isn’t related to a package you can use the config.el
file in the layer. In here you can just put Emacs Lisp code and functions that will be evaluated when a layer is loaded.
Dependencies
Sometimes you want to hook something in your layer into another package. This is most common for making sure your alayer works well with default packages like smartparens. To do this you’ll want to use eval-after-load
. Here’s an example of a package adding extra functionality to yaml-mode
.
This guide hopefully gave you enough info to get started, but there’s so much more to Spacemacs that isn’t here. There’s a bunch of other sources of information that you should look at if you can’t find what you want:
The Gitter Chat
Please visit the Gitter chat room if you have any questions about configuring or using Spacemacs that you can’t figure out, or just come to chat with other Spacemacs users. There’s always tons of knowledgeable people there, including the awesome maintainer @syl20bnr, who will help you out.
The Documentation
Most of these layer concepts and mechanics are explained in depth in the massive Documentation. It also has information on lots of the functionality available in Spacemacs.
The Source Code!
If you want deep insight into the workings of Spacemacs you should really take a look at the source code on Github. The main difference between me and the average Spacemacs user is that I have read lots of the source and thus I know a lot about how Spacemacs works. I swear it’s really not that complicated, you’ll discover that most of Spacemacs is actually just the spacemacs
layer which is just like any other configuration layer except it is included by default. You can also read the code for the contrib layers for ideas, although the techniques these use might be less consistent since they were written by lots of differnt people, many of them newbies. For a good start I recommend skimming through this packages.el file. You can also use SPC h SPC
to search for layers and hit enter to visit their source.
I hope this helped you on your way to become a Spacemacs power-user. This guide was rather specific to configuration but I plan on maybe writing other tutorials on basic use and other tips. Don’t forget to say hi to me and all the other awesome Spacemacs people in the Gitter chat, we always love hearing from other Spacemacs users!
Spacemacs is an extensible and customizable text editor, built on top of Emacs and using Vim keybindings. The goal of the project is to combine both Vim and Emacs editors, getting the best parts from each. Spacemacs distribution is based on community-driven Emacs config, which greatly extends default Emacs behaviour and adds a lot of additional features.
- 1Installation
- 2Running Spacemacs
- 3Usage
- 3.2Basic Concepts
- 3.2.2Editor states
- 3.2.2.1Normal state
- 3.2.2.2Insert state
- 3.2.2.3Visual state
- 3.2.3Buffers (Tabs)
- 3.2.4Files
- 3.2.2Editor states
- 3.3Advanced concepts
- 3.3.2File Navigation
- 3.2Basic Concepts
- 5Troubleshooting
Installation
Install Emacs
Spacemacs is built on top of Emacs, so we need to install Emacs first.
- InstallEmacs package
Backup old Emacs configuration (optional)
If you used Emacs before, be sure to backup your previous config.
Install Spacemacs
To install Spacemacs we need to clone an actual config from github, and replace Emacs config entirely. As of September 2020, it's recommend to install the develop branch of Spacemacs:
If you want to install the master branch instead, which hasn't been maintained for months, do:
Install Adobe Source Pro fonts (optional)
The default font used by Spacemacs is Source Code Pro by Adobe. It is recommended to install it on your system if you wish to use it.
- Install adobe-source-code-pro-fonts package
If the specified font is not found, the fallback one will be used.
Remove Emacs config file
Backup (if required) and remove the ~/.emacs file if you haven't already. Otherwise Spacemacs will not load since that file prevents Emacs from loading the proper initialization file. You can do this by either renaming it through:
Or you can just remove it without backing it up:
Run Spacemacs for the first time
Now it's time to launch Spacemacs.
For the first time you will be asked for features that should be installed. All the choices are alternatives, so something should be selected in any case. This choices affects some Spacemacs behavior and hotkeys. It's recommended to choose default values, just hitting Enter. Defaults are pretty optimized and you can always change them later.
When you finish with the questions, Spacemacs will download and install all the required packages. It may take a few minutes. Spacemacs may seems frozen at this time, but it's okay.
Running Spacemacs
To start spacemacs simply run:
Spacemacs will be ready to work when there are no '..' operations in the bottom bar would be displayed.
Daemon mode
Spacemacs can also be launched in a daemon mode. Daemon mode allows to initialize editor once, and connect to it later, without re-reading configuration file. It can be useful, when you have massive configuration file, so the initialization sequence would be completed only once. You would be able to connect immediately any time later then.
To run Spacemacs in daemon mode:
Then you can connect to instance1
later, using emacsclient:
Systemd Module
You may want to create a systemd module to run the emacs daemon. Note, due to security concerns stemming from community ELPA packages among other reasons, running the daemon as a user-privileged systemd user module is recommend as described here.
Create an emacs user systemd service file such as:
Edit your Emacs/Spacemacs desktop file as the following. Please note the changes to Exec. The rest is just nice aesthetics.
Then run..
Check to make sure no errors occured. If you have already been mucking around with emacs running as a daemon and get errors, I recommend enabling the user emacs service we just made and reboot. It happened to resolve my issues. It might also be useful to check your emacs service..
Then, if successful, enable for persistence..
Upon completion, you may start emacs via your DE launcher and enjoy significantly reduced loading times, however emacs still does not instantly open on even very powerful systems. You may also alias the following command if you prefer. 'instance1' may also be renamed as well but be sure to match the daemon's name in the service file as well.
Spacemacs App Icon Mac Os
Usage
Using Spacemacs may be tricky for the first time, especially for complete beginners. However, your efforts will be rewarded. Only a few key concepts are required to perform basic tasks.
You can always exit Spacemacs by typing :q[Enter]
Built-in Tutorial
You can always run Spacemacs built-in tutorial by pressing SPC h T
when in Spacemacs.
Basic Concepts
Prerequisites
In order to explain the basic concepts we need some text to play with. Let's generate it first. Please, don't mind if the commands are unclear right now, you don't need to know them at the moment.
- Run Spacemacs
- Press
SPC b N
to create new empty buffer - Press
9 SPC i l l
to insert some text
You should see nine lines of generated text as the result. Use them to experiment with the commands described in the next sections.
Now we can move closer to a concept named states.
Editor states
The major difference between Spacemacs and regular text editor is states. Each state changes the way how the editor works. For example, there is an insert state, where you are able to enter text (like in a regular text editor), and there is a normal state, where all your key presses are used as commands, without changing the actual text.Only one state can be active at a time. Switching between the states is the key skill to use Spacemacs successfully.
The current editor state is displayed in the left bottom corner. It has the form of a colored rectangle with text '1' (by default). The color describes the current state. There are a lot of states, but only a few of them are used regularly:
- Orange. This is normal state. Used for entering commands and text navigation.
- Green. This is insert state. Used for text input.
- Grey. This is visual state. Used for selecting chunks of text and controlling them.
You can also check the cursor color for the current state.
Normal state
Open app on startup mac. Normal state is used for text navigation and running commands. You can't directly enter text in this mode. Instead, you're able to quickly navigate and make any sort of corrections there. Normal state is the default state and its color is orange.
You can always return to normal state by pressing ESC
key or fd
key sequence if you accidentally leave it.
Navigation
For basic navigation, the following keys are used:
h
- move cursor by one symbol leftj
- move cursor by one line downk
- move cursor by one line upl
- move cursor by one symbol right
It's also possible to navigate between words or even sentences with a single key:
w
- move to next word (beginning)b
- move to previous word (beginning)(
- move to the beginning of current sentence)
- move to the beginning of next sentence^
- move to beginning of line$
- move to the end of line
To scroll the pages, use the following commands:
Ctrl+f
- move one page downCtrl+b
- move one page upgg
- goto first line of the documentG
- goto last line of the document
You can also use numbers with commands, so they would repeat n times:
5j
- move cursor five lines down7w
- move cursor seven words forward3 Ctrl+f
- move three pages down20gg
- move cursor to line with number 20
There are a lot of commands to be uncovered. Basically, you can navigate between everything in Spacemacs, thanks to Vim-like flow. Check the additional resources to get the details.
Text manipulation
You can modify text with the following commands:
x
- cut the symbol under cursordw
- cut the word under cursordd
- cut the line under cursoryw
- copy (yank) the word under cursoryd
- copy (yank) the line under cursorp
- paste copied/cut textra
- replace the symbol under cursor to a
You can also use numeric arguments there.
Undo/Redo
You can undo and redo changes with the following commands:
u
- undo last changeCtrl+r
- redo last change
Insert state
Insert state is used for the text input. It's very close to regular editor behavior. However, the ability to modify text is limited. You will need to switch back to the normal state in order to make corrections. The color of insert state is green.
Entering
To enter the insert state, press i
from the normal state. Your cursor will change to being a green thin line. Now you can type something. When you're done, just leave the insert state by pressing ESC
key or fd
key sequence.
There are a lot of ways to enter insert mode. The difference, however, is only related to the initial cursor position. It's enough to know just the i
hotkey for the first time. But there are also others and they will be very useful once you master them:
i
- enter insert mode before the cursora
- enter insert mode after the cursorI
- enter insert mode at the beginning of the lineA
- enter insert mode at the end of the lineo
- enter insert mode at next lineO
- enter insert mode at previous line
Leaving
To leave the insert state press ESC
key or fd
key sequence. You will return to normal state and cursor will change to orange.
Visual state
This state used for visual text selection. It allows to select text chunks and cut/copy them. The state color is grey.
To enter visual state press v
hotkey from the normal mode. Then you can navigate around using normal mode hotkeys with only one difference: text selection. Cursor movements would select text, based on initial cursor position, and you can y
ank (copy) or d
elete it later. Remember, that you can use commands like ve
or v(
to quickly select words or sentences. Check the Normal state: Navigation
section to get the idea.
You can also press V
to quickly select the whole line.
Visual block state
Visual block state is more powerful version of visual state. It allows to select text in columns. It's similar to multi-cursor concept on regular editors and IDEs. This state can be entered by pressing Ctrl+v
hotkey. Then you can navigate with h j k l
keys to see the difference.
There's lots of stuff that can be done in visual block state. Refer to the additional resources for this information. This feature is called vim visual block mode in Vim parlance.
Buffers (Tabs)
Text in Spacemacs is located in areas called buffers. They are very similar to regular editor tabs. You can switch between buffers and create new ones. Buffers are also used by the editor itself to store some information you can inspect later.
Navigation
To show the list of current buffers press SPC b b
. You will see a new window at the bottom. This is the place where you can inspect, filter, and navigate buffers. Some buffers already exist there, like *Messages* and *scratch*. They are created by the editor and contain some useful information.
The first thing you can do with the bottom window is to type anything into the pattern
field. This will filter buffers. If there are no buffers left after the filtering, you can create a new one by simply pressing 'Enter' after your input. The new buffer will be created and opened.
You can also open any buffer by hand. Press Ctrl+j
or Ctrl+k
to navigate between the lines. Then press Ctrl+l
or Enter
to confirm your choice. The selected buffer will be opened.
h j k l
keys? They are widely used for navigation. In some cases we need to use modifier keys like Ctrl
. That allows to input and navigate at the same time. You can also use some hotkeys from normal state to control buffers:
Spacemacs App Icon Mac App
SPC b b
- list buffersSPC TAB
- switch to last viewed bufferSPC b n
- switch to next buffer (one forward)SPC b p
- switch to previous buffer (one backward)SPC f s
- save the current buffer to fileSPC b d
- close current buffer
Spacemacs App Icon Mac Desktop
Files
Spacemacs provides two options for file navigation: inline navigation and built-in file manager. Inline navigation is used in Spacemacs confirmation dialogs and it's very similar to the shell one. Build-in file manager is more user-friendly and allows to check the file details. Learning the basics of each is the essential key of mastering Spacemacs.
There also advanced options available, like more powerful file manager and file tree. They are covered in Advanced
section.
Inline (Helm)
Inline navigation available with SPC f f
hotkey. It uses the window very similar to buffer-navigation one. You can filter and select files there. Just type anything to narrow results, or press Ctrl+j
or Ctrl+k
for moving the line down and up. Press Ctrl+l
to open file or directory, and press Ctrl+h
for going backward. Press TAB
to autocomplete the input.
File manager (Dired)
If you need more visual method, run built-in file manager by pressing SPC a d
Enter
. You can navigate, using Ctrl
+h j k l
keys, and press Enter
to enter directories and open files.
There are some hotkeys available (refer to dired documentation for more):
q
- quit diredR
- rename fileC
- copy file+
- create new directory
Advanced
section. It provides more features and can be the best replacement for Dired when you master it.Exiting
Exiting the editor can be achieved with SPC q
this will show the multiple exiting methods.
Some available are:
SPC qf
Quit current frame - good for emacsclient framesSPC qq
Quit emacs Kill-emacsSPC qr
Quit emacs and restart resuming layoutsSPC qR
Quit emacs and restartSPC qd
Quit emacs and restart with --debug-init
Advanced concepts
At this step you are able to open files, make changes and save them successfully. Half the way is done, and now you can choose what to master next. There are some sections you may be interested.
Layers
Layers are one of the strongest features in Spacemacs. Layer is a set of packages and configuration options that greatly extends editor functionality in some way. There are layers for different programming languages, for example, or layers, providing additional tools (like IRC messaging, or integrated web browser). The full list of layers can be found at Layers documentation page.
Some layers are already shipped with Spacemacs, the others can be added manually. To do this, open Spacemacs configuration file (SPC f e d
), and find dotspacemacs-configuration-layers
section there. Then simply add selected layer to the list and restart Spacemacs. It will download all the required files on the next start.
Spacemacs will also offer you to install a new layer when you open a file with an already known extension. For example, if you open a .html
file, the installation of the html
layer is offered.
You can customize layer behaviour by overriding some layer-specific variables in your Spacemacs configuration file. Check the appropriate layer documentation to get the details.
File Navigation
There are some additional tools for file navigation. They may greatly increase the way you use Spacemacs on a daily basis.
File tree (Neotree)
You can run file tree by pressing SPC f t
. New window opens, accessible with SPC 0
. Standard h j k l
navigation is available there. You can change root folder with R
and toggle hidden files with s
. Create new files with c
and rename the old ones with r
. Check Neotree documentation for the details.
R
while on the current root path (first line of the window). Inline file navigation opens, just go backward with H
as far as you need and select .
directory thenFile manager (Ranger)
If you need a full-featured file manager then Ranger may be the best choice. A lot of useful features are available there, like an instant h j k l
navigation, inline file preview and ability to manipulate files. It also improves default Dired behaviour (SPC a d
) a bit. Install ranger
layer and run it with SPC a r
. Check Ranger documentation for the details. Along with customization options, there are a lot of useful hotkeys.
Windows
Spacemacs allows you to split the screen into the separate windows. Each window has a personal number and can be accessed with SPC n
hotkey, where the n
is a selected number. Windows can be splitted individually, so it gives an ability to create complex layouts.
Some of windows hotkeys are presented below. Check the inline help (SPC w
) to get more.
SPC w 3
- focus window with number 3SPC w s
- split window horizontallySPC w v
- split window verticallySPC w d
- delete windowSPC w u
- undo last window actionSPC w m
- toggle window fullscreenSPC w .
- enter window transient state
This article or section needs expansion.

Configuration
This article or section needs expansion.
Troubleshooting
Slow startup time
If startup time exceeds 10 seconds, there may be a problem with exec-path-from-shell
module. It can be safely disabled on linux systems. Complete the following steps:
- Open Spacemacs configuration file by pressing
SPC f e d
- Find
dotspacemacs-excluded-packages
section - Add
exec-path-from-shell
module here, so the final entry would be likedotspacemacs-excluded-packages '(exec-path-from-shell)
- Save changes with
SPC f s
and restart Spacemacs
Incorrect minor mode icon fonts
If you see 24ba 24c0 symbols instead of ⒺⓀ or they are too ugly, then you have to install a good unicode fallback font for these symbols, or disable them by setting dotspacemacs-mode-line-unicode-symbols
to nil
.
Mass 'Package is unavailable. Is the package name misspelled' error while updating packages
Might be related to GNU ELPA GPG key expiration, run : (setq package-check-signature nil)
then M-x package-install
RET gnu-elpa-keyring-update
.If that doesn't work, try rolling back to emacs 26, e.g. via emacs26-gitAUR.