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.
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!
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 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 …
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:
4. :wq5. 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.