Skip to main content

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
45 votes
1 answer
40k 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 ...
JuanCaicedo's user avatar
39 votes
2 answers
19k 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 ...
Daniel Wu's user avatar
  • 1,781
37 votes
7 answers
43k 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": "...
Emmanuel Touzery's user avatar
34 votes
6 answers
8k 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 ...
Croad Langshan's user avatar
25 votes
6 answers
17k 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 ...
Vamsee's user avatar
  • 353
24 votes
5 answers
12k 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 ?
Running Turtle's user avatar
22 votes
4 answers
8k 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', ...
agentofuser's user avatar
19 votes
3 answers
25k 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/
Mateus Vahl's user avatar
18 votes
2 answers
10k 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?
bombadil's user avatar
  • 547
18 votes
1 answer
8k 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.
sebastian's user avatar
  • 417
18 votes
1 answer
6k 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 ...
abingham's user avatar
  • 927
17 votes
2 answers
4k 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 (...
Violet's user avatar
  • 488
16 votes
2 answers
4k 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: ...
Aviral Goel's user avatar
13 votes
4 answers
18k 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?
sid-kap's user avatar
  • 544
12 votes
6 answers
4k 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-...
Jeffrey Bauer's user avatar
12 votes
2 answers
3k views

High CPU/memory usage and 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....
xji's user avatar
  • 2,635
12 votes
3 answers
8k 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 ...
owise1's user avatar
  • 351
12 votes
2 answers
13k 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 ?
ChiseledAbs's user avatar
12 votes
1 answer
2k views

How can I use the #+OPTIONS: broken-links: option to ignore broken links, in a specific way?

I have a very large orgmode document that has internal links to many different parts of the document. If I try to export a subtree that has an internal link that points to a part of the document ...
Jim Larsen's user avatar
11 votes
4 answers
4k 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 ...
plx's user avatar
  • 347
11 votes
1 answer
6k 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 ...
Dimitri Schachmann's user avatar
9 votes
3 answers
3k views

How to unhighlight after searching in evil mode?

I have a text file opened in Spacemacs with evil mode on. When I search for a term by means of /term [Enter] then found "term"s are highlighed. How do I remove that highlighting? I tried / [Enter] - ...
Raffael's user avatar
  • 225
9 votes
2 answers
5k views

Automatically preview Latex in org-mode as soon as I finish typing

I'm using org-mode in Spacemacs (0.200.10.x). To preview Latex when I open a file, I understand that I can either set the variable org-startup-latex-with-latex-preview to t in my init.el, or set the ...
Heisenberg's user avatar
9 votes
2 answers
5k views

How can I do a git diff on the current file with magit?

I'd like to do a diff on the current file / buffer compared to the git repository. Ideally a single function that could be called, or binded to a keyboard shortcut.
Chris Stryczynski's user avatar
9 votes
3 answers
2k views

how do I do case sensitive searches using evil/spacemacs?

I'm trying to perform a search and replace in spacemacs but I need it to be case sensitive when by default it appears to be case insensitive. So I try to do :set noignorecase but then I have this ...
ChiseledAbs's user avatar
8 votes
4 answers
6k 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 ...
wolfv's user avatar
  • 1,393
8 votes
2 answers
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 ...
Mark's user avatar
  • 440
8 votes
2 answers
4k 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 ...
Zaid's user avatar
  • 81
8 votes
1 answer
6k views

Wrap line/text in org-mode when I re-open a file

I run emacs 24.5 and word/line wrap works fine when I write new text. However, when I reopen an org file, the text is not wrapped. This makes it hard to read text I have written before. Is there a ...
krishnab's user avatar
  • 519
8 votes
1 answer
1k 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?
vitvly's user avatar
  • 201
8 votes
4 answers
939 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 ...
jajpater's user avatar
  • 323
8 votes
1 answer
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 ...
Zsolt Botykai's user avatar
8 votes
1 answer
1k 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 ...
wolfv's user avatar
  • 1,393
8 votes
1 answer
3k views

Org-Mode correct indentation

I am using spacemacs and try to use full text indentation. When I execute "visual-line-mode" and "adaptive-wrap-prefix-mode" by hand via M-x the text will indent, when I edit it. Of course I tried to ...
gunnarw's user avatar
  • 81
8 votes
1 answer
189 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 ...
Michael Fox's user avatar
8 votes
1 answer
2k views

How can I see all errors in a Go project with LSP mode?

When opening a Go project with LSP mode, spacemacs / flycheck only shows errors in the current package, not including tests files. For example, in the following project: |- pkg1 |- pkg2 |- cmd When I'...
Robert Zaremba's user avatar
7 votes
4 answers
4k 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 ...
Xi Xiao's user avatar
  • 533
7 votes
2 answers
4k 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?
Daniel Wu's user avatar
  • 1,781
7 votes
2 answers
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 ...
xji's user avatar
  • 2,635
7 votes
2 answers
4k 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-...
wolfv's user avatar
  • 1,393
7 votes
1 answer
3k 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 ...
iLemming's user avatar
  • 1,273
7 votes
2 answers
2k 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 ...
wolfv's user avatar
  • 1,393
7 votes
1 answer
3k 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 ...
typesanitizer's user avatar
7 votes
2 answers
5k views

How do I open a file in spacemacs?

Say I have spacemacs open and now I want to launch some sort of file browser to open a file. How do I do it? I have found SPC f f which sort of works but the navigation is quite cumbersome. There is ...
Elias's user avatar
  • 171
6 votes
2 answers
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 ...
Adam Hammes's user avatar
6 votes
2 answers
3k views

How to see *Messages* buffer in Spacemacs?

How to see *Messages* buffer as advised in this answer - https://emacs.stackexchange.com/a/32069/23367? Why do I need this? I am new to Spacemacs and I am trying to understand how it can help me ...
Anatoli Babenia's user avatar
6 votes
2 answers
2k views

Pasting without auto-indent

Whenever I paste something in a source code buffer it is automatically re-indented. This is great sometimes, if I'm pasting a complete block of code or a single self contained line for example, but it'...
Thomas Parslow's user avatar
6 votes
2 answers
8k 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 ...
Zsolt Botykai's user avatar
6 votes
4 answers
2k 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 ...
JuanCaicedo's user avatar
6 votes
2 answers
9k 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 '(...
vitiral's user avatar
  • 163

1
2 3 4 5
17