-
Welcome to emacs rocks, episode four.
-
Today I'll go all controversial on you -
-
and rebind some emacs keys.
-
That's what emacs is all about isn't it?
-
Sharpening that knife.
-
But first, a cool set of keystrokes.
-
I'm switching to buster.js for my javascript tests these days
-
and the syntax is slightly different
-
watch how quickly I can go from one to the other
-
done! hah
-
did you see the first keystroke?
-
ctrl-s is excellent for navigating
-
but for short distances, it's suboptimal
-
watch this
-
I have to press enter to exit from the search, to start typing
-
so let vim show the way with its excellent F-command
-
move to char
-
there's an extension called iy-go-to-char that does much the same
-
I mapped it to meta-m, as in move
-
yes, that keystroke is usually back to indentation
-
but I find a much better mnemonic for that is meta-i
-
so ... meta-m t, and I can press period right away
-
meta-l for lower case,
-
which conveniently moves my cursor to the end of the word
-
forward, and transpose-word
-
we had transpose-line and transpose-char in a previous episode
-
so this is transpose-word ... nice, huh?
-
so, iy-go-to-char - you can just google it
-
it's really nice
-
you don't have to bind it to the same key as me if you find that controversial
-
I see that the suggested keystroke is ctrl-c f
-
since it's supposed to be a short command for quick navigation,
-
I want to have it on one keystroke
-
let's take a look at another example
-
here's a misspelled word - and another
-
to quickly fix those I press:
-
meta-m p e
-
meta-m o, and o again, t
-
very nice
-
that was episode four
-
hope you enjoyed it
-
see you next time