Questions tagged [spacemacs]

Spacemacs is an Emacs layer focused on modal editing via Evil mode, mnemonics and easy configuration, and the space bar. Use this tag if your question relates to Spacemacs-specific functionality.

Filter by
Sorted by
Tagged with
33
votes
6answers
6k views

Running spacemacs alongside regular emacs: how to keep a separate .emacs.d

I would like to try spacemacs. But I don't want to switch from my regular emacs configuration just yet, so I would like the configuration that's currently in my .emacs.d to be in one directory, and ...
33
votes
2answers
11k views

How to clear cache of projectile file in spacemacs?

I am using spacemacs and often use the SPC p f key binding to find files in a projectile project. But even after removing a file from a git, SPC p f will show me that deleted file. I tried using SPC ...
24
votes
1answer
13k views

Command to insert code block? [duplicate]

I found the command SPC m x c to insert a small code snippet like ~~. I would like to insert a longer snippet like #+BEGIN_SRC #+END_SRC Is there a command to do this? I found a way to add it for ...
24
votes
5answers
19k views

How to pretty-format code (auto-insert newlines, indent, etc)?

I'm using spacemacs but presumably it's emacs knowledge that's required here. I have a JSON file with a single long line, let's say this JSON from json.org/example: {"menu": {"id": "file", "value": "...
21
votes
5answers
7k views

How do I change portions of a custom theme?

I'm using one of the pre-defined custom themes that come bundled with Spacemacs (zenburn). How can I modify specific portions of the theme, for example just change the font color used for comments ?
19
votes
5answers
13k views

How to disable line wrapping in Spacemacs?

I have limited emacs experience. Tried to find a solution to disable line wrapping in Spacemacs but couldn't find any. The solution to this problem in Vim is to execute set nowrap. But it's not ...
18
votes
1answer
5k views

What's the best way to use local packages in spacemacs?

I'm a developer for a package (ycmd) used by spacemacs, and I'd like to try using spacemacs as well. I'd like spacemacs to use the "development version" of my package, i.e. the one I'm hacking on ...
16
votes
2answers
6k views

How do I move a buffer in spacemacs to a different window / frame

Is there any keybinding or function to move an open buffer to a different window or a different frame in spacemacs?
16
votes
2answers
3k views

How do I turn off Spacemacs’s tildes on empty lines?

I just installed Spacemacs, mainly for its nifty defaults. One default I'm not so pleased about is that it puts tildes on empty lines in the file. I've tried putting (setq vi-tilde-fringe nil) and (...
13
votes
3answers
16k views

How install a custom theme to spacemacs

It's possible to install a new theme in spacemacs? How should I do this? I'm trying to install some theme from http://themegallery.robdor.com/
12
votes
5answers
3k views

Disable smartparens in spacemacs

The smartparens-mode doesn't suit my style of editing. If I attempt to disable it globally in spacemacs, however, the mode is re-enabled: (smartparens-global-mode -1) How do I disable smartparens-...
12
votes
2answers
3k views

How do I jump out of enclosing parentheses?

I'm using spacemacs to edit Python code. When I type an opening parentheses, the closing parentheses is automatically inserted for me and the cursor is put in the middle for further typing. But: ...
12
votes
1answer
4k views

Spacemacs: paste into minibuffer

Is there a way to paste something into the minibuffer? For example if I want to eval-expression and paste something in there neiter C-v or (obviously p) will work? There has to be a way.
8
votes
3answers
6k views

Expanding Snippets in evil-insert-mode

I just moved to spacemacs from vim and am a complete newbie with emacs. I cannot figure out how to expand yasnippets while in evil-insert-mode. I know yasnippet is available because I can choose from ...
8
votes
1answer
4k views

How to use a local version of a package in spacemacs?

This is similar to this question but the answer there seems to be deprecated. Let's say I'm using a layer and want hack the code of a particular package that layer is using. How do I go about it? To ...
8
votes
1answer
720 views

Cursor moves one position left after exiting insert mode?

I'm using evil via spacemacs. When I exit insert state, the cursor moves to the left one character. Why is that? Is it a bug, or is it a feature? Can I turn it off?
7
votes
4answers
3k views

how to use org-mode speed commands (speed keys)?

This keybinding was working on my Spacemacs with evil mode, org-mode, and ivy: t org-todo and is listed in the Spacemacs bindings: http://spacemacs.org/layers/+emacs/org/README.html#key-bindings ...
7
votes
4answers
881 views

Have Ctrl-a increase a number just like in vim

In spacemacs Ctrl-a is being used to move to the beginning of the line. I'm more used to 0 to move to the beginning of the line and $ to the end, which works in spacemacs. Ctrl-a increases numbers in ...
7
votes
4answers
10k views

Spacemacs: kill buffer and kill window in one command?

Is there a spacemacs command that both closes the window and kills the buffer? In other words, the equivalent of Vim's :q?
7
votes
1answer
3k views

How to change indent size for typescript layer in Spacemacs?

I have a tsfmt.json file with { "indentSize": 2, "tabSize": 2 } which does get picked up appropriately by tide when running M-x tide-format. But when I start a new line by pressing RET or 'o', ...
7
votes
2answers
7k views

How to operate the undo-redo tree in spacemacs?

I just hit SPC a u and it opened the undo-redo tree. Now I can't operate it. I go on the tree, press enter and nothing happen. I can't close it! Either :q is unrecognized. How do I operate this ?
7
votes
1answer
2k views

mu4e folders for multiple accounts (contexts)

I'm trying to set mu4e to use for both personal and work gmail accounts. I successfully configured offlineimap and fetched the mail. Then I tried setting mu4e, and according documentation: the ...
7
votes
1answer
2k views

How do you enter unicode characters in Spacemacs?

I am currently using the normal Evil keybindings (defaults). How do I enter unicode characters such as U+21d2 ⇒ ? In routine applications such as Gedit or Firefox, we can use Ctrl+Shift+U 2 1 d 2 or ...
7
votes
1answer
3k views

Create private spacemacs layer for yafolding

I had tried to create my first (private) layer for spacemacs, for the yafolding package. So I had created the ~/.emacs.d/private/yafolding/packages.el file with the following contents: (setq ...
6
votes
2answers
1k views

Spacemacs disable :q

I'm moving from vim to spacemacs, and the only little frustration I have at the moment is that in vim my workflow tends to involve quitting vim a lot (with :q). I find myself continually exiting ...
6
votes
2answers
2k views

If longlines-mode is removed in new emacs, how can I soft-wrap the line around the column instead of window edge?

I'm now trying to switch from Vim to Spacemacs. It seems that Longlines Mode is the way to go in Emacs to soft-wrap the line around the column http://emacswiki.org/emacs/LineWrap. However it seems ...
6
votes
2answers
3k views

how to add date and time into spacemacs' mode line

I usually use Spacemacs in maximized window, thus the date and time presented in mode line is a must. I understand that spacemacs uses powerline mode to mimic vim, the manuals of both spacemacs and ...
6
votes
3answers
2k views

How to remove elements from the spacemacs mode-line

I'd like to remove certain elements from the mode-line: To the left, the 802 is the buffer size in bytes, if I'm not mistaken. I could not care less about that. To the right, it tells me the buffer ...
6
votes
2answers
1k views

How to install org-drill on Spacemacs?

The following is my failed attempt at installing org-drill on Spacemacs. I tried following instructions on https://bitbucket.org/eeeickythump/org-drill But there is no "org-modules" in my .spacemacs ...
6
votes
4answers
1k views

How to disable mouse in Spacemacs

I'd like to completely disable my mouse in Spacemacs. Following the advice in this answer, I set up the following in my .spacemacs file as (defun dotspacemacs/user-config () "Configuration function ...
6
votes
1answer
5k views

How to learn Dired in Evil mode?

I am learning Dired in Evil mode. h j k l / are Evil keys that obviously work in Dired. Are there others? Is there a table of Evil keys for Dired? I am using Emacs 25.2.1 with Evil, Spacemacs, and ...
6
votes
1answer
408 views

Spacemacs : insert single character in normal mode

I am using Spacemacs in Vim mode, and I would like to be able to insert a single character while remaining in normal mode, as described here for Vim. For example, typing SPC i k in normal mode would ...
6
votes
1answer
790 views

What is “Symbol Highlight Transient State”?

Pressing * (spacemacs/enter-ahs-forward) works like visual star in Vim, except for the mini buffer: What is "Symbol Highlight Transient State" in the mini buffer about? Where is the documentation ...
6
votes
1answer
111 views

Can emacs auto-save backtrace?

Trying to debug a problem with debug-on-error. Backtrace appears for a second and then some other parts of the system make it disappear and emacs becomes dysfunctional so I can never read it. Is ...
6
votes
1answer
506 views

Prevent electric-indent-mode from reindenting the current line on RET

I am using the Spacemacs configuration files. When I am typing code, electric-indent-mode reindents the current line whenever I press enter. This often causes the indentation to be incorrect when ...
5
votes
2answers
2k views

Can't use Magit in Spacemacs - “Symbol's function is void: cl-struct-define”

When I try to run magit-commit-popup in Spacemacs, I get the error Symbol's function definition is void: cl-struct-define The only reference I could find to this issue was on this Github thread, but ...
5
votes
2answers
2k views

How do I specify a different folder for .spacemacs file?

I want to put my .spacemacs into Github, so I cloned it to a local directory. How to let Emacs use the .spacemacs in that directory instead of from the default ~/.spacemacs?
5
votes
1answer
5k views

Spacemacs use anaconda environment

I have anaconda environments for python2 and python3 as I have code written in the different versions In spacemacs (with python layer installed), when I open ipython (SPC m s i) it starts with my ...
5
votes
2answers
7k views

Configuring org-mode within spacemacs

I'm a bit confused because the I'm trying to configure org within spacemacs as advised in the official layer documentation for spacemacs), I should use (with-eval-after-load 'org ( ... : (defun ...
5
votes
1answer
1k views

Abnormally large savehist file?

I'm starting to use Spacemacs and occasionally I get stuck with Emacs beginning to require infinite amount of CPU and memory. Inspecting my .emacs.d/.cache folder reveals that the file savehist is 1....
5
votes
1answer
3k views

How do I use Mac/OSX key bindings with Spacemacs?

I want to use Mac CMD+C for copy and CMD+V for paste in Spacemacs but I think it redefined CMD to Meta. How do I change this mapping behavior? I found mac-key-mode but that package seems old and I ...
5
votes
1answer
2k views

How to open .org files with visual-line-mode automatically turned on?

How to open .org and .txt files with visual-line-mode automatically turned on? Also, is there a way to configure cursor-movement so that cursor moves as if the visual line where a logical line? line-...
5
votes
2answers
6k views

spacemacs flycheck: use specific linter for python

I would like to use a specific linter for python files in spacemacs. A coworker sent me an emacs code-snippet that should solve my problem, but doesn't seem to be loaded. (add-hook 'python-mode '(...
5
votes
3answers
2k views

interactively crop screenshot region and insert link to local image in org buffer

I am trying to pull together information that is scattered across a multipage PDF in an org buffer. The related items typically occupy a small region on a page only and may be many pages apart, hence ...
5
votes
2answers
2k views

How does Spacemacs allow tab completion in helm?

I am brand new to using Emacs and I love it. I tried Spacemacs to see the functionality it provided out of the box and I want to replicate some of those features in my own Emacs configuration. From ...
5
votes
1answer
731 views

How do I move custom- commands into a separate file and include them in .spacemacs?

I don't know whether it is because I started using org-mode but when I checked the .spacemacs file this is what I found: ;; Do not write anything past this comment. This is where Emacs will ;; ...
5
votes
2answers
947 views

Getting MyPy Working in Spacemacs

I'm struggling to get type checking working in spacemacs, and I would appreciate any help. I've installed MyPy properly on my system (I can run it from terminal) and added python-mypy to dotspacemacs-...
5
votes
2answers
321 views

How to turn off autocompletion for numbers (and numbers only) in company-mode in spacemacs

When typing a number in spacemacs all kind of numbers are being suggested. I can autocomplete them with enter. I like this behaviour in the case I'm typing words (made up of letters). But I don't want ...
5
votes
1answer
491 views

spacemacs key bindings in plain vanilla evil emacs

As the title suggests, I would like to use spacemacs like keybindings in plain vanilla evil emacs. The spacemacs key bindings are very intuitive. But the package is too heavy for my low-end laptop. ...
5
votes
1answer
265 views

How to disable $ pairing in latex-mode in Spacemacs?

When I click $ I get another matching $ thanks to smartparens. I would like to disable this behavior but keep all other matching pairs like () enabled. I tried adding this to the Spacemacs config but ...