Hacker News new | past | comments | ask | show | jobs | submit login

Or for anyone that is more open-minded, yet worried about the learning curve of switching from vim to emacs: http://spacemacs.org/



I switched to Spacemacs from Vim a few months ago and I'm probably never going back to Vim. I didn't notice any difference between Evil mode and actual Vim. Took me a week or two to learn the Emacs and Spacemacs specific things before I was comfortable using as my primary editor.


The fact that I cannot use `space` as a direction/movement key in spacemacs is a non-starter for me. I'd have more luck just learning Emacs's keybindings at that point.


Really? As a long-time Vim user that switched to Spacemacs but ended up back on Vim, I've never used the space bar for movement. I'm curious do you also use backspace for movement?


No, not usually, but I use space a lot, which I didn't even realize until suddenly it pulled up a menu every time I pressed it.


at least for me, it feels like i have to change my whole workflow to match spacemacs, instead of being the other way around (i, being able to easily config spacemacs to match my current vim workflow).

it honestly felt really backwards to use spacemacs after ~10y of vim usage. i would prefer to learn plain emacs + evil mode instead.


I'm relieved to see that it's not just me. With all the recent praise spacemacs has been getting, I felt like maybe I was taking crazy-pills or something. It's a very aesthetically pleasing setup, and a fine editor on its own, I'm sure, but it feels a little disingenuous to me the way they aggressively market to Vim users. Like you, I've been using Vim for around 10 years, so any departure in behavior has the potential to seriously cramp my workflow.

(One of the big lures of spacemacs and/or evil-mode for me is that I've always been envious of Emacs Lisp. I see things like GNUS and org-mode and SLIME... then I see Vimscript, and I hang my head in shame.)


I use emacs+evil; tried out spacemacs but found it over-customized. I want to know what everything in my .emacs does, and if I don't like something, how to change it. Spacemacs was way too overwhelming for me.


Another long time vim user, I switched to emacs+evil then to spacemacs back to vim back to emacs+evil. Spacemacs was good but I started to feel bogged down, as I do with big ide's and went back to a very minimal vim.

I have now started back with emacs + evil and a minimal setup. I find it gives me the best of all worlds.


agree.

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.


You can choose a different leader key in your .spacemacs and then bind space to whatever else you wish.


But then it's not spacemacs anymore, right? It'd be commamacs or something? ;)


Comma is used for a leader for the major mode. Of course it can be changed, as well. Everything is configurable.


I'm afraid I'm just too wedded to the jump list to make the switch, though Evil mode did do a good job with text objects.


I think pretty recently evil-jumper was added to evil itself, and the default jumplist actions are done well enough, imo. Have you tried it since then? Or is it just the edge cases (and there are plenty...) which throw you off?


I started using spacemacs (without evil) a few months ago and before that I was using a customized emacs. Spacemacs improves the user experience with their package management approach (it kicks much ass). Not only that but the c-c++-mode is almost as good as what I had configured and it took 5 minutes to configure instead many days. The version of which-key, magit and org-mode provided by spacemacs is better than what I used to have and greatly improved my emacs experience. I can't recommend it enough. My spacemacs file on github for anymone who is interested https://github.com/green7ea/SpacemacsConfig/blob/master/spac...


Spacemacs is awesome, I ended up doing the same thing you did -- chucking years of accumulated config in .emacs out the window. I think the one thing that Spacemacs could really benefit is a good guide to using it/emacs, similar to the Atom Flight Manual http://flight-manual.atom.io/


Also worth checking out for anyone who (like me) thinks vim has much better keybinding philosophy than Emacs, and that switching evil-mode makes Emacs a perfect working environment.


Any vim user, try this:

1. brew install emacs, apt-get install emacs, or pkg add emacs

2. vim ~/.emacs

3. paste the following, verbatim. Don't bother reading it:

  (require 'package) ;; You might already have this line
  (add-to-list 'package-archives
               '("melpa" . "https://melpa.org/packages/"))
  (when (< emacs-major-version 24)
    ;; For important compatibility libraries like cl-lib
    (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
  (package-initialize) ;; You might already have this line

4. :wq

5. Open emacs

6. Press escape, then "x", then enter. Now type package-install and press enter.

7. Type evil-mode and press enter.

8. Click the "Buffers" menu at the top of the screen, then click "scratch"

Now pretend like you're using Vim. It's almost identical. It's literally like using Vim. You can shift-V = to indent code, gg shift-V gG to select the whole buffer (or, y'know, command-A), etc.

There were only two minor differences that annoyed me: ctrl-u no longer scrolls up, and yanking text copies to the global system clipboard. (v"+y is supposed to do that, not yanking!)

To fix the scrolling issue, press escape then x and type "customize". In the search field, type "evil". You'll get a list of fancy customizations. One of them is C-u for scrolling; enable it, then click "apply and save" at the top.

That should get you started. There are a bunch of fun things to do... Try escape, x, list-packages. You don't even need to know a single keybinding. You'll just get a list of packages with hyperlinks you can click on, which pops up a little info blob that usually has a link to a github repo for the package.

If you try to stick with emacs, the next week or so will be "interesting." You an use escape x apropos to find info about escape x commands. (These are called "M-x" in emacs parlance. And if you use the GUI version of emacs, you can use alt-x instead of pressing escape then x. It's much easier, but doesn't seem to work in the terminal.)

Personally, I stuck with it in order to learn how emacs worked: how you can design a program to be so extensible, and how extensible it truly was. Gamedevs in particular might be interested in going through this gauntlet; the way that emacs lisp exposes functionality will inform the design of the next engine you write. Check out Yegge's post about the universal design pattern as applied to gamedev.


> These are called "M-x" in emacs parlance. And if you use the GUI version of emacs, you can use alt-x instead of pressing escape then x. It's much easier, but doesn't seem to work in the terminal.

That works in all my terminals — I suspect something's awry with your settings.

One issue is that if you use gnome-terminal under Ubuntu, I think by default it steals alt for its own menus. There's a setting to disable that, and I always selected it when I used gnome-terminal, because who uses GUI menus with a terminal? Nowadays I just use st.

Another tip is to set your caps lock key to control. This is one of those 'how did I ever live without this?' things (I actually buy keyboards where the control key is physically where caps lock is on most; it's that vital).

And if you write any Lisp or code, you might like to swap parentheses & square brackets. For me, at least, it's another one of those 'how did I ever live without this?' things. I type parens all the time, and now I don't have to hit shift. It's … wonderful.


It could also be if he's on a Mac, you have to go to Terminal -> Preferences -> select your current profile -> Keyboard -> check "Use option as meta key"

I found that out because I was trying to start using org mode but I'm new to emacs. That was one of many issues I ran into trying to get it to work. (First was that the emacs that comes with OS X is ancient and doesn't have org-mode, so I had to use brew to get a good version).

Next is none of the tutorials actually match the shortcuts that org-mode actually uses on my system.


>Another tip is to set your caps lock key to control. This is one of those 'how did I ever live without this?' things (I actually buy keyboards where the control key is physically where caps lock is on most; it's that vital).

I recently switched from Vim (still using it through plugins in some IDEs) and decided to not start with Evil mode but give Emacs keybindings a proper go. Switching the capslock key to CTRL has been crucial. This switch is a built in feature in OS X and Gnome. Downloaded a third party app in windows for my corporate pc.


One thing I recently did - MacBook Pros do not have a right control key and I really wanted one for my emacs use. So I downloaded a remapping program that interprets holding the return key as control, but normal presses as return. Seems to have worked out well, and it gives me some keyboard symmetry with caps lock control.


Set option 'metaSendsEscape' for xterm, lots of help here, https://www.emacswiki.org/emacs/MetaKeyProblems


I actually use empty shift for parens, so comfy I almost feel guilty about it...


Figured it out myself. Couldn't find a way to map single presses of the Shift key in emacs, but I was able to do this using AutoHotKey in Windows:

LShift UP::Send, ( RShift UP::Send, ) LShift & F13:: RShift & F13::

As a Clojure and JavaScript dev I think I am going to like this mapping quite a bit, so thanks for the tip!


That sounds like something I'd like to try. Mind sharing the code from your init file that does this - assuming you are doing this in Emacs?


For this remapping and a few others I'm using Karabiner for OSX. I remap elisp commands in emacs all the time, but I don't know how to remap the keybinding for the single SHIFT to parens. The answer might be here: https://www.gnu.org/software/emacs/manual/html_node/elisp/Ch...

Karabiner is pretty good though, and you can select certain keybindings to only work in emacs.

I've also remapped CONTROL to CAPS LOCK, a more common re-binding to save one's left-hand from endless torture and mutilation!

Karabiner https://pqrs.org/osx/karabiner/index.html.en On GitHub https://github.com/tekezo/Karabiner

It's also pretty simple to extend Karabiner with XML scripts.


> Check out Yegge's post about the universal design pattern as applied to gamedev.

You mean this one?

http://steve-yegge.blogspot.com/2008/10/universal-design-pat...


Yeah! It looks like your URL 404's though.

http://steve-yegge.blogspot.com/2008/10/universal-design-pat...

All of it is pretty interesting, but it's sort of unreasonable to say "Here, read this tome." You can skip to the Wyvern section for the important bit. Gamedevs will be particularly interested, because the question of "How do I enable people to write games in the most flexible way?" is one of the great unsolved problems in gamedev. There's just no good way to do it. Every engine has tradeoffs, but circa 2016 these tradeoffs are anachronistic. A modern engine should be written mostly in the scripting language that it provides. Most of the codebase that would otherwise be C++ code should be script. This can be done with almost no performance penalty. So the only question left, once you decide to really do this, is how do you design it?

I think Emacs' design is the answer. Almost all of the core ideas can be incorporated into a modern game engine, provided that it's built from scratch.

Few people have the skills or the inclination to pull this off, which is why it hasn't happened yet. But I suspect anyone who does this will end up with thousands of users who love making things in it. As with Emacs.


I'm interested in this idea. What aspect of emacs design makes it unique? What are the "core ideas" you mention?


I think that emacs's core idea is a small core (pun intended) of functionality written in a high-speed language (C in emacs's case), entirely orchestrated and glued together in a high-productivity dynamic language (elisp).

Emacs really isn't a scriptable editor: it's an editor written in a 'scripting' language atop a relatively small set of primitives which happen to be useful for editing. But it's also an email client written in that same language, and a version-control interface, and a web browser, and a news client, and a Tetris game, and and and …


> Yeah! It looks like your URL 404's though.

Ok. Yeah, I accidentally deleted an #\l from "html" :(.


I did. Eventually you hit an emacs-ism or have to edit the emacs config files. It's just not the same no matter how they try to make it so.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: