
EmacsGolf (2013) - lelf
http://jcarroll.com.au/2013/08/25/emacsgolf/
======
melling
I started an Editor Rosetta Stone of sorts.

[https://github.com/melling/EditorNotes](https://github.com/melling/EditorNotes)

Emacs and vim have been battling it out for 40 years. There's probably room to
improve the typing efficiency of both.

Emacs has ergoemacs and god-mode, for example.

[https://github.com/chrisdone/god-mode](https://github.com/chrisdone/god-mode)

[http://ergoemacs.github.io](http://ergoemacs.github.io)

Plus you can use vim key bindings.

Is a modal editor better? Should key bindings be built around a more efficient
keyboard layout, like Programmer Dvorak, for example?

[http://www.kaufmann.no/roland/dvorak/](http://www.kaufmann.no/roland/dvorak/)

~~~
ajsalminen
ergoemacs-mode has support for defining the bindings independently of whether
you're using Colemak, Dvorak or QWERTY. That's a pretty good idea since the
bindings are not really about any specific layout but should be picked based
on travel distance etc.

While I've found the mode very useful in developing my own setup I've moved on
from it because it seems to make too many things randomly stop working for me.
I like just picking my own bindings.

For me one good goal is to try to get as much as you can of the editing setup
system-wide instead of a specific set of keybinds in just that one editor.
With a non-modal one this is easier as there are standards like CUA and some
other well-established shortcuts that tend to be present in many programs. The
default placements just aren't all that great so a tool that can map
keybindings to any kind of input can help you make use of them. I use xmonad
to do it.

------
omaranto
Tim Visher recorded a series of videos of himself playing VimGolf in Emacs
[1]. If you want to play there is a great VimGolf client for Emacs [2].

[1] [https://vimeo.com/timvisher/videos](https://vimeo.com/timvisher/videos)

[2]
[https://github.com/igrigorik/vimgolf](https://github.com/igrigorik/vimgolf)

~~~
timvisher
I don't have many videos _but_ my emacs videos. That said, this is a slightly
more specific link:
[https://vimeo.com/channels/222837](https://vimeo.com/channels/222837)

~~~
ajsalminen
These are great, I've been looking of examples of skillful Emacs use. Are
there any videos of you or someone else putting the knowledge into practice
while working on code?

~~~
omaranto
Have you seen Magnar Sveen's videos?

He has a series called Emacs Rocks of short (most are <5 minutes, I think)
videos each showcasing one related set of commands, a series called Extending
Emacs where he writes a new minor mode for Emacs and a series called Parens of
the Dead where he write a webgame in ClojureScript (that last one doesn't star
Emacs, but Emacs definitely plays a role).

You can find all of them at [http://emacsrocks.com/](http://emacsrocks.com/)

~~~
ajsalminen
Thanks, I've taken a look at the Parens of the Dead series earlier and I've
definitely been enjoying the Emacs Rocks videos. I'll check out Extending
Emacs too. Parens of the Dead is the kind of thing I was looking for more of.

------
ajsalminen
VimGolf is a fun pastime but in terms of speed I feel focusing only on
keystrokes might not give you the full picture.

If the solution requires mental effort to do, some other way that is is easy
and fast to arrive at in most cases could be faster in terms of time elapsed.

Would be fun to have the equivalent of typeracer for VimGolf with a series of
tasks that would be similar to what you encounter when programming and a race
against time. I wonder if it would be possible to come up with some kind of a
"Edits Per Minute" that wouldn't be completely misleading.

------
girzel
That's where these comparisons always fall down: you're trying to do something
in X number of keystrokes in vim, whereas in Emacs you'd write your own
function to do whatever it is. How do you compare those?

Coincidentally (or not), re: the challenge in the above post, I wrote a
command that solves exactly this problem: yank-interleaved.
[https://www.emacswiki.org/emacs/KillingAndYanking#toc3](https://www.emacswiki.org/emacs/KillingAndYanking#toc3)

How many keystrokes does it take to install and use that function?

~~~
omaranto
I don't think you give Emacs enough credit: sure you can write an Elisp
function to do exactly what you need, but you can also usually do it in a few
keystrokes using built in commands. Try VimGolf in Emacs sometime, my
experience is that it's usually not too hard to get keystroke counts close to
those of the vimmers.

------
binaryblitz
So while vim is my terminal editor of choice, I use Sublime for programming. I
can do the challenge in 12 keystrokes, 11 if you don't have to delete a
trailing line.

1\. control+g (Goto line number) 2&3\. 11 (line 11) 4\. enter 5\.
cmd+shift+down 6\. cmd+x 7\. backspace (delete trailing line) 8\. cmd+shift+up
9\. cmd+shift+l (multiple cursor mode) 10\. right arrow (line up cursors) 11\.
tab 12\. cmd+v

~~~
wingerlang
Did it in 9.

1\. DOWN hold until line 11

2\. SHIFT+DOWN hold until end of file to select

3\. CMD+X to cut

4\. BACKSPACE to remove space

5\. CMD+A to select all

6\. CMD+SHIFT+L to multiline

7\. RIGHT to line up

8\. TAB

9\. CMD+V

