Spacemacs - General Discussion, Blog Posts, Wiki

Question, I am working with Clojure and Cursive plugin for Intelij and want to do the same with Spacemacs:

  • Reload one module or all modules into iex
  • Select line of code and run it into iex

I noticed that @kblake tweeted how to do this earlier…

How to execute a region of elixir code in Spacemacs:
Select/highlight a region of code and then SPC m e r


Ok but this not exactly what I wanted. Yes this command evaluates current line but in new context.
But what I want is to load module(s)/mix project into iex (and also possible to reload these modules), and then run current selected text using code from these modules.

1 Like

Anyone using Spacemacs with Macintosh Computers an European (German) Keyboard?

1 Like


With vim, I’ve gotten used to using Shift+up arrow (Shift+down arrow) to scroll page up (and down).
Do you know how I can map these keys to obtain the same behavior in spacemacs ?

1 Like

Ok so I think I finally found a way to do what I was looking for.
I added these lines in the dotspacemacs/user-config block in my ~/.spacemacs config:

  (define-key evil-motion-state-map (kbd "S-<up>") 'evil-scroll-page-up)
  (define-key evil-motion-state-map (kbd "S-<down>") 'evil-scroll-page-down)

Not sure if that’s the recommended way but it seems to work


How to transform Atom to Spacemacs :slight_smile:

Alchemist v1.8.0 is out


  • [Hex] Add Hex package interface for fetching specific package informations.
  • [Refcard] Update dynamic generated refcard with phoenix-mode

See Alchemist-Hex in action here:

1 Like

If you are -like me- having trouble installing the latest Emacs 24.5 on Ubuntu 14.04 the following script comes in quite handy:

1 Like

Couple of questions.

Is there something like StyleCop available to enforce Elixer style like for example this one?

Is it possible to autocorrect or apply the style to your code like proper indentation, use of parenthesis for functions etc. (as prescribed in the style) like for example:

# not preferred
def some_function arg1, arg2 do
   # body omitted


# preferred
def some_function(arg1, arg2) do
   # body omitted

Is it possible to “desugar” code like for example:

[ name : "J. Doe" ]


[ { :name, "J. Doe" } ]

Or remove shorthand like:

add_one = &(&1 + 1)


add_one = fn (n) -> n + 1 end
1 Like

There are som hex modules available which do some suggestions on styling. Spontaniously I can think off dogma and credo.

Both do provide you with a mix task to check your code style, but as far as I know, there is no integration into any editor for them so far.

1 Like

I like Credo and I use it in some of my projects. That said, I don’t think alchemist should include support for credo, except for being able to enter a mix command and display the output in a buffer—which alchemist is already capable of doing. The reason behind my thinking: While I think Credo is good I could imagine other style checker libraries coming out that I might prefer in the future for any reason.

But—this is Emacs. We can customise it to our hearts content! This doesn’t need to be part of Alchemist. We can use some of the stuff in alchemist to shoehorn credo integration into our Alchemist installation. I got the following in my Emacs configuration where I configure my Elixir environment:

(defun mg/alchemist-run-credo-on-project ()
  "Run credo on project"
  (alchemist-mix-execute "credo"))

(define-key alchemist-mode-keymap (kbd "p c") 'mg/alchemist-run-credo-on-project) 

I define a «run credo» function and bind it to the alchemist keybinding; which means that credo is run when i hit C-c a p c (I use vanilla Emacs)


The most important parts of Spacemacs run okay when I use PuTTY except some of the coloring and special characters.

Any idea on how to get this working?

1 Like

Having that ugly colors is typical for emacs in a terminal. It can get even worse than what you showed us, if you activate whitespace-mode.

But I haven’t seen that black on black until now…

And the special characters is a typical problem when having unicode in a windows terminal. It just doesn’t work, because windows has a different encoding there. Perhaps you can check if putty allows some conversion?


Protip: SPC m (major mode) is always mapped to ,, so for example SPC m e r => , e r. 50x less keystrokes :slight_smile:


Any idea how this maps to emacs-style keybindings? I do already know that I have to substitute the leading SPC in any chord by M-m, which is especially annoying when trying to do M-m m… I always have the finger a microsecond or so to long on my Alt-key, so I do send M-m M-m instead of what I wanted originally.

1 Like

Find a spacemacs file for Ubuntu and OSX here:

Works for me with a Swiss German keyboard layout, so it might work for a German keyboard.

1 Like

How display table of context in help and jump to specific topic?
Assume I am on Elixir String.split help in spacemacs.

1 Like

I don’t know how to configure my spacemacs, I would like to make it work for ES6/7 and not use colons

1 Like

Hey guys, I’m a Spacemacs beginner. I installed Alchemist so far (I think :stuck_out_tongue:) but Elixir files have no syntax highlight? Could anyone give me some quick rundowns on how to do it?

1 Like