it honestly felt really backwards to use spacemacs after ~10y of vim usage. i would prefer to learn plain emacs + evil mode instead.
(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 have now started back with emacs + evil and a minimal setup. I find it gives me the best of all worlds.
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.
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
'("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
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.
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.
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.
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.
LShift UP::Send, (
RShift UP::Send, )
LShift & F13::
RShift & F13::
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!
On GitHub https://github.com/tekezo/Karabiner
It's also pretty simple to extend Karabiner with XML scripts.
You mean this one?
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.
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 …
Ok. Yeah, I accidentally deleted an #\l from "html" :(.