Hacker News new | past | comments | ask | show | jobs | submit login
Spacemacs 0.105.0 released (github.com/syl20bnr)
212 points by psibi on Jan 4, 2016 | hide | past | favorite | 97 comments



I've been using emacs for about 20yrs as my main coding editor and vi regularly as a fast command line editor. Can some one explain in clear terms why I would want to learn a new set of key bindings? What are the advantages of spacemacs other than a better configuration system and nifty graphics? Both the Github page and website do a terrible job of explaining this, IMO. Maybe the answer is that it was not made for me.


I've been using Emacs for the past decade and I switched to Spacemacs after declaring my second .emacs bankruptcy sometime last year after it got support for regular Emacs keybingings, (setq-default dotspacemacs-editing-style 'emacs).

First one was four years ago, my configuration was rendered completely useless after starting to use OS X and I didn't know where to start, so I forked https://github.com/purcell/emacs.d and rebuilt my config on top of it.

Second one was because every time I take a break from a language like Clojure and Haskell for three months and then get back to it my config for the relevant modes get obsolete. Spacemacs has a big community that continuously adapts language layers to the changes on upstream and provides the best experience for development behind a few flags like "(haskell-enable-ghc-mod-support t)".

After switching to spacemacs my configuration went from 2023 lines of code in the original config I forked + 1005 lines of my own to a .spacemacs.d/init.el file that's 243 lines long (without comments). It provides 90% of stuff I want out of box, and provides many more features I never discovered/configured and most importantly it takes the burden of maintaining stuff I only occasionally use from my hands.

If you are not happy with some stuff fundamental to Spacemacs such as Helm I don't recommend it but otherwise give it a try, it is really easy disable Evil integration if you are used to regular Emacs keybindings.


I like spacemacs because pressing spacebar brings up the command palette and lets me preview all the various menus I can bring up via a keypress (e.g. w for window, p for projectile, h for helm, s for search, k for evil lisp, m for major mode, etc). I never have to bring my hands up from my keyboard to get anything done. That's awesome.

Spacemacs still leaves a lot to desire. But it's pretty damn close to be the perfect all-in-one text editor I've been looking for.


I've been using Emacs for 1.5 years or so, then switched to VIM for a brief time period and I fell in love with the way it uses keybindings in a grammatical manner, using verbs, prepositions, subjects and objects. For example, the key sequence di" means "delete in parentheses", and similarly diw means "delete current word". It's also very intuitive to switch back and forth between a 'text insertion' (INSERT) and a 'command' (NORMAL) mode, because quite often you do multiple commands at once (e.g. cutting things here, pasting them there). It seems very natural to have completely changed keyboard bindings for a command mode (instead of relying on finger stretches for each command). I also very much prefer line-wise editing (e.g. in visual line mode) now, even though I thought I would never like it. Then I heard about Spacemacs, that it gives you some peer-reviewed configurations and VIM keybindings and I was immediately sold.


> I've been using emacs for about 20yrs as my main coding editor and vi regularly as a fast command line editor.

It was not made for you. If you want to change or automate something, you have the option of either getting Emacs or Vim to do that for you, but only whatever you need.


Spacemacs is just a configuration over Emacs and as a result is customizable with elisp as well.


Do you prefer VI/VIM keybindings to Emacs keybindings?

That's what spacemacs is, in a nutshell. It attempts to marry the keybindings of vim with the technical advantages of emacs (better process handling, server/client setup, etc)


Does anyone have any opinions on the keystroke efficiency of vim vs classic Emacs bindings? I still use vim and Emacs occasionally, when I'm not in Xcode. vim is my quick cli editor and Emacs is always open because I find using macros quick and efficient, plus I use org files. I've never mastered vim, but the precision users strive for is noteworthy. I've often wondered if I'd press half as many keys daily if I mastered vim.

http://vimgolf.com


Well, "having a better configuration system and nifty graphics" is no small feat. I've been using Emacs since '97, but lately it's been hard to keep up with the configuration of all modern Emacs extensions. Spacemacs solves this easily.


Basically that's exactly what it is -- a wrapper around the configuration system of emacs to make it more manageable, plus the vi keys option (the normal emacs keys are still there).


I switched to spacemacs because its key bindings don't use ctrl key as much as normal emacs does.


> Can some one explain in clear terms why I would want to learn a new set of key bindings?

The whole point of Spacemacs is integrating things together around evil-mode in its only little package that's ready to go. If you don't have any interest in evil-mode, then I doubt that Spacemacs is for you.


I feel like it's more for vim users who need a gentle introduction to emacs (me) and really don't want to leave modal editing and more advanced vi features behind. It goes a lot further in emulating the day-to-day vi experience than literally anything I've ever tried before. But it's also a pretty nicely managed set of extra packages that are all smacked around to play nicely with each other.

If you've been using emacs for 20 years and already know how to do stuff and maybe even write your own modes, then it's proooobably not for you. (I mean, you coulda been using evil a long time ago).


How is this any better than e.g. viper mode?


The main feature of Spacemacs over just plain evil is that it has a number of "layers" for different languages, utilities and emacs things, which introduce consistent, vim-friendly keybindings. With plain evil-mode, you'd have to tinker with every package you wanted to use and come up with some good vim-style keybindings.

The Spacemacs layer setup does restrict you to what it supports, unless you want to do things manually.


it's a wrapper around the successor to viper mode (evil) that also attempts to introduce bindings in a smart (ymmv, obv) way.

it's much more than just viper, but the ultimate goal is the same: to provide emacs with vim keybindings for prefer to want to use emacs that way.


My understanding is the evil-mode emulates Vim, and viper-mode emulates Vi. Vim is "Vi iMproved", so it has more to it than just basic Vi.


Also a great addition is the new Spacemacs website which went live today: http://spacemacs.org/


I love Spacemacs, but the old site looked better. Why all the animation? It's like the Web is devolving back to how it was when it was covered in animated gifs, marquee, and blink elements. Animation doesn't catch my attention -- it makes me want to close the page.


I'm agree with you in this particular instance. I suspect it's a tendency that comes when upgrading the look of a webpage - you want to add all the bells and whistles you've been seeing on other websites.


The old site was broken, though: all the links lead to non-existent pages.


Perhaps you are not the intended audience, then?


Like I said, I love Spacemacs. I just don't like animation for animation's sake. It's the modern equivalent of blink and marquee elements. Just saying that I like the old site better.


People like to say that emacs isn't an editor but a platform, or just a lisp interpreter that comes with text editing libraries. But is it? The emacs development team sees it as a text editor, I think. If it was just an interpreter, I can imagine many editors built on top of it, with spacemacs being just one. If it's an editor, than wouldn't you expect the good ideas from projects like spacemacs to make its way into the emacs core? I wonder if the emacs core team should go all in with the emacs-as-a-platform idea and focus on just the core features, letting projects like spacemacs to create an appealing editor.


well, that's kinda been the way emacs has been for a while now. They recently added a really easy package managing system which allows for emacs to look and behave drastically different from each other. About making its way into the core, the dev team won't really put anything into the core unless other things in the core require them.

Getting the dev email list to agree to a change of something that is easily added through packages or just init.el/emacs.d/ is difficult if not impossible. But this is a good thing: opinionated workflows are adaptable but not forced on seasoned veterans and newbies alike. Getting good packages into elpa or tasteful additions into core that augment emacs is always welcomed it seems.

Join the development list and just follow discussions. It's always fun to see really smart people talking about new code, extensions, opinions, and the new maintainer John seems to want to do a good job and produce some nice software. I've got it going to my gmail under a label and never filling my inbox so it gives a nice reading break every now and then at work.


Emacs core requires FSF copyright assignment. Most of the configurations in Spacemacs use third party extensions which don't have the assignment.

But being non-core is not really a barrier to installation in my opinion. In many ways it is a plus, allowing for out-of-cycle releases and to experiment / break compatibility at their own pace.


It's already this way in a sense. There are many things that seem more "solid" to me in Vim because there is a default implementation that is baked into the editor. In Emacs, there are several different libraries and various language modes may interact with one or another of those libraries. Many of the various libraries are included in the default Emacs distribution. For example, (IIRC) there are 2 or 3 "folding" libraries that are in Emacs, while Vim just has folding baked in. Sometimes this makes Emacs seem less consistent to me than Vim does.


That is excellent idea. I am learning now and using spacemacs and it makes total sense to have focus on core and allow other teams to be focused on ui and usability.


I love Spacemacs, I'm a total convert I barely ever use vim now -- best of both worlds.


How long did it take you to convert? Did you relinquish vim key-bindings and cross to straight emacs? I still prefer out of habit vim keystrokes, but I'm having to relearn everything else (buffer navigation, searching, definition navigation etc)


No benefit of relinquishing vim keybindings, but you have to learn some extra emacs bindings (like Ctrl+G to cancel) if you need to handle every situation.


Which both worlds?


The extensibility of Emacs, along with Vi[m] key bindings.

Although Spacemacs does have a "Holy mode" which will keep the Emacs bindings and won't use vim-like keys.


Probably modal editing and plugins that aren't constrained by Vimscript.


Presumably Emacs and Vim.


Slightly off-topic. I'm looking for a tutorial/article/project to create a toy (or even feature-full) emacs-like text editor from the ground up.

Using two languages: C and scheme (preferably R7RS-small).

I have quite a few resources to create a vi/vim like editor from scratch (vis, some python projects, etc) but non in the scheme+C arena along emacs lines.

Emacs project itself is a bad example of studying the architecture of such an editor because of its humongous codebase (~250 kloc C, ~1.2 Mloc e-lisp) unless someone has done a good write-up about how to get familiar with architecture and extensibility infrastructure.


I haven't seen any tutorials for writing an emacs-like editor, but I think studying the source of QEmacs [0] and mg [1] is a good starting point.

[0]: http://bellard.org/qemacs/

[1]: http://homepage.boetes.org/software/mg/

Also, you could take a look at these:

http://www.emacswiki.org/emacs/EmacsImplementations

https://wiki.gentoo.org/wiki/Project:Emacs/Emacs-like_editor...

http://texteditors.org/cgi-bin/wiki.pl?EmacsFamily


You might want to look at Zile:

https://www.gnu.org/software/zile/


The Craft of Text Editing --or-- Emacs for the Modern World

https://www.finseth.com/craft/


Been using this for a few months now and this configuration of emacs has made coding and note taking a pleasure.


Spacemacs is awesome! Anyone who still using Vim should at least try it.


1.2 What is the official pronunciation of Spacemacs?

As it is written, that is space then macs.

I was wrong this whole time. I always pronounced it like "space emacs" or "spacey-macs" if you will.


I pronounce it spuh-CHEE-max, like the pronunciation of Dr. Spaceman's name on 30 Rock.


First thing I thought of, took me too long to find the reference: https://www.youtube.com/watch?v=1wQbKAAfCCY


Let's take a page from 30 Rock's "Dr. Spaceman" and pronounce it "spah-chem-aks"

But really, I thought it was just "space-macs"


Yeah that's the correct pronunciation, it's in the FAQ somewhere.


Easily the best editor going imo.


If it were just an editor I would agree, but the #1 killer app, org-mode, puts it in a different class of application.


For me Spacemacs is perfect:

7~ years using vim 4 years using emacs

enjoyed modal editing in vim, got very good with it enjoyed how easy it was to program/debug emacs tried setting up evil, wasn't up to the task of configuring it

With both Emacs and Vim I had trouble having to upgrade my configs too often, but that's not necessarily their fault.

It could just be a coincidence of timing, but Spacemacs gives me most of what I want by default and makes it easy for me to customize.

I will say that the Emacs graphic rendering bug which causes pathologically bad performance on long lines has been biting me a lot using Spacemacs to do Golang development.


A colleague is using it and I had a look, but it seems kind of weird because it doesn't seem like Emacs any more to the point where I couldn't easily do Emacs stuff with it.

I've been using regular old Emacs for about 20 years. For those more familiar with Spacemacs, how hard is it to accomplish some of what it does, or transition to a more normal Emacs setup once you get to like Emacs?

Edit - this is just out of curiosity. I hope to use Emacs for another 20 years at least :-)


I've been using Emacs daily for about 2.5 years. This summer I decided to try Spacemacs. While I found the setup pretty smooth, I was unable to get certain behaviors to function like I was used to, so I ended up just going through the package lists and stealing liberarally from their config. The end result is an Emacs that's pretty and has a config I can understand. Plus I learned a lot about elisp.

The important things that simulated the Spacemacs feel for me were these packages: helm, hydra, and powerline. I haven't yet grokked modal editing, so I don't have any experience with vim/evil.


The biggest benefit of Spacemacs is not possible to replicate any other way: you can cd ~/.emacs.d/ and git pull and upgrade your whole configuration directory with new features and nifty additions and provided with org-mode. No more searching "how do I...?" on Emacs StackExchange, because it's very likely whatever feature you're looking for has already been set up for you.


I think you can now configure it to run in "holy mode". In both modes you can still type meta-x (also via `<space>:`).

I think if you had a very customized emacs setup, you'd have to put some effort organizing it into custom "layers", which is how spacemacs organizes its config and making sure you don't have big conflicts in mapped keys.


IMHO, the layers are pretty easy to put together if you're comfortable with your Emacs configuration. The first one I coded up (for notmuch) was done inside an hour and that's when I was new to Spacemacs.


Pressing `SPC (or M-m) t E e` will switch the editing style to Emacs (cursor becomes blue) and you should be at home :-) From there the Spacemacs key bindings are available behind `M-m`.


How well does Spacemacs work in a terminal (e.g. iTerm)? I've been using iTerm+Tmux+vim and don't want to give up iTerm+tmux just yet.


It seems to work reasonably well in a terminal, but I found myself wanting to use some features that weren't supported in the terminal. The biggest reason for me to use tmux + vim was vim-slime for editing+repl environment, which basically works out of the box in all of the modes I care about for emacs (clojure/cljs, python, javascript).

I've found emacs to be reasonably pleasant even for things like git operation (via magit). Most of my scripting for projects end up written in python or bash and controlled via a Makefile, and emacs (like vim) fits in perfectly for this. There is very little I use a terminal for these days, and when I do want one, I open it inside of emacs. This keeps me down to emacs + chrome as my only applications running.


It works probably not as well as vim which is a terminal application. Spacemacs is fully featured on the GUI version, the terminal version works well, but be ready to meet a few bugs in the borders :-)


That is exactly what I have been using since early last year. No problems at all if you aren't interested in some of the more esoteric emacs features such as inline images. Give it a shot!


It works great. I use the same setup, and was big into spacemacs and even contributed to it but ended up right back at iterm + tmux + vim again. Vim is faster, and suits my needs better.


When you say faster: Did you try starting emacs in daemon mode and connecting to it with emacsclient?

I still kinda miss vim -p (and I am not a huge fan of eyebrowse as a replacement for vim's tabs), but that very much solved the speed issue for me.


I don't think I ever did that. Maybe I'll give it a shot, thanks.


I really like eyebrowse after just now trying it.


Not so well. There are plenty of problems in the term and the community kind of avoids fixing/ta;king about them.

I had some trouble with it: things that only work with a fringe, the theme colors all mixed up, even putting a sensible line number background. And after quite quite some time trying to fix it I decided it was just not worth it and started an emacs config from base (I come from Vim). Now I'm quite happy.

Also, I go back to spacemacs git repo to get ideias, tips for my own emacs config.


Don't know about Spacemacs but Emacs works perfectly fine in a terminal, from skimming, it looks like Spacemacs is more optimized and configured for GUI Emacs than for terminal Emacs.


The more common Emacs workflow is to run a terminal inside of Emacs and edit remote files with Tramp, i.e. with a transparent remote connection.


Pretty much okay. I've been using it in PuTTY and it works, but there's definitely been some jiggery poking to get it to play nicely.


I don't have any experience in neither Vim, nor Emacs. Should I try it? Looks awesome. Also - is there any way to add Go (golang) support?


I personally would find spacemacs very overwhelming if I didn't have prior experience with either vim or emacs. My recommendation is to pick one of the two, use it for a while and get some experience, and then consider spacemacs.


Just wanted to reiterate this. When I started with Spacemacs I had a few years of using and customizing Vim under my belt, yet I still found it very daunting at the beginning.

The main problem is customization. Even though Emacs Lisp and the Emacs ecosystem allows for a more organized and advanced setup, there are so many options to do any single thing.

Add to that the newbie-unfriendly documentation, you end up spending way too much time trying to understand how to customize things properly, or at all. Whereas with Vim, if I had a simple customization idea, I would just google it, find a solution in 2 minutes and slap a few more lines in my 1k LoC .vimrc.


There is a Go layer: http://spacemacs.org/layers/+lang/go/README.html

You can launch an evil-tutor to start with Vim key bindings by pressing `SPC h T`.


> is there any way to add Go (golang) support?

The details seems to be here: https://github.com/syl20bnr/spacemacs/tree/master/layers/%2B...


You should learn Vi-motions even if you won't be using Emacs or Vim. They are useful in other apps like browser or terminal too.


everyone talks about spacemacs=vim. this is nice, but what turned me off of spacemacs was the layers config abstractions. It breaks the normal configuration of emacs.

Just install evil mode and a few contrib packages.. that's spacemacs lite.


>Just install evil mode and a few contrib packages.. that's spacemacs lite.

Yes. However one of the most attractive features of spacemacs is... that somebody has selected the packages and installed them for you! You don't have to do anything!


.. and you're stuck forever in the spacemacs layers abstraction, per my comment above. (Try installing a package from Melpa)


It takes literally 5 minutes to add a layer that will install whatever package you want.


Here, https://github.com/coldnew/coldnew-spacemacs He use spacemacs as module inside .emacs.d. May helps.


I feel like the author missed a golden opportunity to call this Vimacs ...


That already exists. It's Emacs bindings for Vim.

http://www.vim.org/scripts/script.php?script_id=300


whyyyy would you do that?? i say that as a devoted emacs addict!


This is really cool, I've been using bbatsov's one and I'm going to try this. One thing I really suggest is installing the seethru plugin here's a screenshot, it makes emacs transparent.

http://imgur.com/DUCv2UK

I also use webstorm 11 as my emacs skill is insufficient to graduate to apprentice neckbeard. my apologies.


Try `SPC T T`


What does SPC translate to in holy mode?


It is by default `M-m`.


Come to the dark side of Emacs. We have cookies.


I used spacemacs for a bit a few months ago but launch-times were really long. I use emacs as my default editor and I really hated the bootstrapping process when I fired up emacs to edit a config from the command line.

If someone has a simple fix to this problem I would gladly use it since they seemed to have the right ingredients for a top notch experience.


emacs --daemon and EDITOR='emacsclient'


    alias emacs="emacsclient -nw -a ''"
is the best I've found.

-nw: Open a new frame in current terminal (otherwise it just opens the file in whatever other emacs window you already have launched).

-a: Start the daemon if it isn't running.

'': Little trick so you can launch it without a filename.


    -a: Start the daemon if it isn't running.
    '': Little trick so you can launch it without a filename.
Ha, if only. From the bit on `-a` in https://www.gnu.org/software/emacs/manual/html_node/emacs/em... :

    Specify a command to run if emacsclient fails to contact Emacs. This is useful when running emacsclient in a script.
    As a special exception, if command is the empty string, then emacsclient starts Emacs in daemon mode (as emacs --daemon) and then tries connecting again.
`emacsclient -a vim` will run vim if it can't connect to a running daemon.


I noticed that using GUI Emacs in OSX, a first boot is slow and will open two windows: a Spacemacs buffer in one window, and the file in another. Subsequent files are opened much faster if you keep the Spacemacs buffer opened.


To clarify the other answers: you will want to run one or two emacs daemon instances at startup and then edit files using emacsclient, which hooks up to the background daemon and pops up a new window instantaneously.


All the links in the docs TOC are broken: https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUME...


We know, we have a problem generating links that work both with our new online documentation system and github (syntax incompatibility). For now you have to use http://spacemacs.org/doc/DOCUMENTATION.html :-)


I tried it for couple of weeks but returned back to emacs. It has some cool features but I couldn't get used to its keybindings. I'm sure they're customizable but I wasn't motivated enough to do so.


Same for me. Cool package if it floats your boat, but it's not what I look for in an editor, especially the "crowd configured" part.


Basically viper in sheep's clothing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: