
Build muscle memory with your favorite editor - swalberg
https://www.shortcutfoo.com/
======
SoftwareMaven
This really didn't work for me. I found needing to parse the command ("Move
backward a word") broke the memory that I have built up over 15 years of using
Emacs. Instead of naturally moving backwards with a flick of the fingers, I
had to concentrate on where each finger was and on the key I was pressing.

I think the _goal_ of this is great, but as it stands, I'm not convinced it is
going to help. Given it aborted my natural wiring, I doubt it will be wiring
things up correctly for people who don't have the wiring (I could be VERY
wrong here!).

Now, take @gruseom's idea of a visual "goal" that you are chasing, and I think
this could be intensely valuable.

~~~
commandar
Just to contrast, as somebody that's a novice-to-intermediate vim user, I
really like this so far. The action verb model feels like it mirrors how I
think when using vim, so at first blush, for me at least, it feels like a good
fit.

I don't know enough about Emacs to compare there, though.

~~~
SoftwareMaven
It may be that muscle memory in editors is created like this:

    
    
      1. Identify a problem
      2. Think what I need to do to fix it
      3. Decide what keys I need to press
      4. Direct fingers to press keys
    

And that gets shortened eventually to:

    
    
      1. Identify a problem
      2. Direct fingers to press keys
    

If that is the case, then this might be a really good first step towards that
process. I would certainly not look to me for that initial feedback.

Perhaps if I could try more complex things (that I don't have current muscle
memory for), I would find it incredibly useful.

Either way, getting better at using your tools is always a good thing.

~~~
commandar
That's actually a very good description of my experience learning vim so far.

It starts off being a very conscious set of actions when first learning a new
command -- e.g., "I want to change the word under the cursor... cw" -- before
becoming something that happens subconsciously as I become more familiar with
a set of commands.

Where this site at least appears to work well is that once I started to
understand vim commands as verbs and nouns, I started seeing actions as
sentences. The drills here seem to reinforce that sentence structure type
approach.

I can see it being less useful for somebody that is familiar enough with their
editor thatt it's already become a mostly subconscious process. While I'm
comfortable using vim for the most part, I'm very far from a high level of
proficiency with it.

------
danso
This is neat, but one thing it misses is the "reward." Not a gamification
award, but the visual feedback from hitting a keyboard shortcut and seeing it
actually happen, which helps reinforce the connection from muscle-action to
program-action.

Another important component is _seeing_ the scenario. Seeing the words
"Duplicate line" doesn't hit the same neurons as seeing the situation in the
text-editor that toggles my brain to think, "I need to duplicate a line here".

Obviously, none of these features are trivial to implement. Great work,
though!

~~~
dlikhten
False. Why gamify, I actually found this incredibly useful all in itself.

~~~
danso
You misunderstood me. I said a reward, but _not_ gamification. The reward when
you complete a successful duplicate line shortcut is that you see a duplicate
line. This helps associate result with muscle action. I'm arguing that this
cements the memory even more.

------
gruseom
This is neat and promising. I agree with other commenters that the weakness is
in telling the user what to do in the form of text like "Move cursor to
beginning of line". Routing the muscle signals through text processing in the
brain is slow and isn't what goes on when you actually use an editor. i.e.,
there's no text in a marquee in one's head telling one what one needs to do
next. Since keyboard shortcuts are all about habit and speed, you definitely
don't want to require any atypical or slow mental processes.

For cursor movement you could show a buffer of text with some kind of target
thingy that moves around, and you have to chase it using keyboard commands.
That might be fun. It would also be simple to create an efficiency score based
on how many commands the user used to get where they wanted to go.

For text manipulation you could provide some auxiliary visual indicator of
what needs doing. For example, to practice deletion, have a buffer of text and
some visual indicator of a character, word, or line that needs deleting. Say
it flashes (probably a bad choice, but whatever). Then the user's job is to
use the right shortcut to delete the flashing thing. At first, the software
could move the cursor to the right place before each new command. For more
advanced users, you could tell them "First move the cursor to the right place
and then invoke the right command to delete the flashing thing". As soon as
they delete one bit, another bit starts flashing. You could measure how long
it takes to delete everything in the buffer this way. That might be fun too.

~~~
mck-
See <http://vimgolf.com/>

One for Emacs would be fun

~~~
gruseom
That looks fun, but also intimidating. It makes me think that maybe tracking
efficiency is a bad idea for learning after all. To stop and think about
whether one's doing X in the most efficient way stymies flow.

Come to think of it, in Emacs I often do things inefficiently – in the sense
of using many more commands than the technical minimum to do a task – because
the basic commands are already "compiled" in my head. If I have to stop and
grope for a less familiar command that could do the job more directly, that's
like switching to interpreter mode, which is much slower. So in the short run,
it can be more efficient in time to be less efficient with commands. This is
the chicken-and-egg problem where one doesn't invest the effort to acquire new
tricks because one's too busy doing one's job with the tricks one already
knows.

The goal is to get more tricks into the compiled set (muscle memory) more
easily. I suspect this is a "don't make me think" kind of challenge. One has a
limited budget of thinking energy and typically needs to spend it on more
important things, so one doesn't have anything left to invest in getting
better at Emacs or whatever, even though one knows one "should". The challenge
is how to move this kind of knowledge into muscle memory using some cheaper
pool of energy.

This is probably a solvable problem because the commands we're talking about
are so mechanical. They don't need to go through the most expensive cognitive
process; our goal is to forget them on that level anyway. But I haven't seen
any teaching tool with a low enough cost in this sense. The OP comes the
closest, which is already impressive. And if you can learn editor commands
this way, there probably are a lot of other useful things you can learn this
way.

------
jlebar
I wonder if this actually teaches you the right kind of muscle memory.

I have no difficulty with hjkl for navigating in Vim, but I had trouble
associating those keys with the string "move <up/down/left/right> one
character".

Mapping from the description of the command to the key is not the kind of
muscle memory I use all day.

~~~
zethraeus
Agreed. Perhaps a block of text/code with lines highlighted along with
instructions on how/what to change them? That would give the right visual
feedback and should be totally doable.

~~~
JakeSc
Yeah, it would be awesome to see prompts like:

> Duplicate this line

or

> Move the cursor to the beginning of this line|

------
watterssn
Wow. Nothing like waking up on Monday morning to find your app at the top of
Hacker News. Thanks to whoever posted this :)

This is awesome feedback. It looks like the most requested feature right now
is moving from reading words to a more visual representation of what's
happening. This is definitely something I've thought about - but didn't want
to attempt until I received exactly this type of response. Thanks! I'll
definitely move this up as a top priority and hopefully have something
implemented soon.

Thanks for everyone else's feedback. I'll carefully read each post and email
I've received and respond appropriately.

Someone asked about the tech stack: backbone.js + sinatra + mongodb hosted on
heroku (2 dynos). I'll try and get a blog post up with more on this plus
possibly a HN postmortem if there is interest.

ps. I'll get eclipse added as well :)

~~~
rpicard
You can also enter command mode in Vim with ^[.

I spent a few minutes trying to figure out how to give you this feedback
before I saw your comment here. Maybe you should list an email address or have
a contact form somewhere on the site. The only thing I found was a Twitter
account, and I'm not on Twitter.

------
viggity
If you want better shortcut muscle memory, just unplug your mouse for a couple
days. Do this once a year or so. You can thank me later.

~~~
bangbang
In OSX, are all dialogue boxes able to be accessed by the keyboard?

~~~
jasonwebster
Yes, but you have to enable it. It's not on by default.

System Preferences -> Keyboard -> Keyboard Shortcuts

And change the radio at the bottom to "All controls" under Full Keyboard
Access.

~~~
JadeNB
To get to System Preferences, you can use CTRL-F2 to get to the Apple menu,
CTRL-F3 to get to the Dock, or—if those shortcuts aren't set up (but I think
that they are by default)—CMD-TAB to get to Finder, CMD-A to get to the
Applications folder, and type a few letters to get to 'System
Preferences.app'. :-)

In the System Preferences window, you can start typing to select 'Keyboard'
(keyboard focus is in the Spotlight menulet).

You can tab to the 'Keyboard' / 'Keyboard Shortcuts' tab bar, then arrow over
to 'Keyboard Shortcuts', then tab to the 'Full Keyboard Access' radio buttons.
Sadly, these last few steps require that Full Keyboard Access already be
turned on! The text below the radio buttons says that you can toggle the
setting with CTRL-F7, but that doesn't work for me; I'm not sure if some other
keybinding is interfering.

~~~
daniel02216
Do you have the 'use F1, etc as function keys' unchecked? You'll need to use
fn+control+F7 instead.

~~~
JadeNB
Nope—the machine is a laptop, but I'm using an external keyboard. For example,
CTRL-F2 and CTRL-F3 both work fine.

------
brey
If you get something wrong, and what you type is longer than the expected
answer, you end up failing the next couple of questions too.

muscle memory - if you type eg "uptime" when the answer should be "free", it
fails on the first character, but you're still typing, by which time it's on
to the next question. which you then fail, because the answer to the next
question isn't "ptime"

~~~
eric_bullington
Yeah, this is a problem. Also, having some nice visual feedback when I get one
right or wrong would be great.

That said, this is an awesome service and I'm going to pay for the premium
account just to support the effort. I'm in the process of switching from a
tricked-out gedit along with nano to just using vim, so this is a wonderful
resource. I'd highly recommend it to anyone trying to learn vim. In the course
of just 10 minutes, I've already learned another 10 commands. Assuming I
practice them another day or two, they'll become permanently part of my vim
repertoire.

EDIT: To clarify what exactly I'm using this service to do: I'm using it to
eliminate the constant need to refer to a vim reference card. The muscle
memory will come only from using these commands in vim, but being able to
eliminate the need to constantly refer to a vim reference for new commands is
a huge plus. I've already learned 10+ new commands that I no longer have to
look up. PS - paid for the premium.

------
Jakob
Textmate: ⌘-[ for shifting left is "History > Back" in Safari and happens
every time when it's the last shortcut in drill mode, which happened to me
both times I tried.

Otherwise nice tool. I agree with the others about visual feedback. For
Photoshop: Show the part of the palette you want instead of the name of the
tool.

------
jasonkolb
No Eclipse? :(

There goes a large chunk of users. You'd think this would be one of the first
editors to have made the short list.

------
ElliotMingee
I'm a little surprised at the lack of Eclipse support, given Java is one of
the most popular languages and Eclipse is the most popular Java IDE

[http://zeroturnaround.com/wp-
content/uploads/2010/11/IDEs.pn...](http://zeroturnaround.com/wp-
content/uploads/2010/11/IDEs.png)

------
joshstrange
I like it however I am stuck on "Open last closed tab" for Sublime in chrome.
Whenever I type it chrome opens the last closed tab....

~~~
mej10
Another issue for Emacs, C-n in Chrome opens up a new window.

------
bdittmer
Try tapping ABACABB (the Mortal Combat blood code) on the homepage for some
fun. Nice easter egg :)

~~~
Groxx
I feel I must ask: do you try this on every website you come across, or do you
check the source on every website you come across? Either way: thanks :D

~~~
SuitAndThai
This was on reddit a couple of days ago:
[http://www.reddit.com/r/programming/comments/wjyvw/shortcutf...](http://www.reddit.com/r/programming/comments/wjyvw/shortcutfoocom_adds_blood_code_to_home_page/)

------
domodomo
Had this idea too, glad someone has executed on it so awesomely. I've been
eager to get better at Sublime Text, so will start using this.

Two suggestions which I think would be really awesome.

!. The hard part of exercising though is getting your butt to the gym. What if
you could sign up for a daily email that keeps you at it, challenging you to
take it to the next level, tracks your progress, sets goals and reminds you to
make them, etc.

2\. It's really abstract to just hit key commands without seeing them actually
do something. What if you made small animated gifs for each action your are
emulating, maybe even with a full fake editor background? This way, your brain
would be tricked further that you are actually performing the action
represented by the keyboard shortcut.

------
sophacles
Cool site, but a minor annoyance, is that some editors, like vim, have
multiple ways of accomplishing a task. For instance move to line 4 can be done
with 4G or 4gg, but only accepts 4G, which is frustrating as I've already
internalized 4gg :) I'm sure there are others.

~~~
johncoltrane
Add :4<CR> to the list of possibilities.

------
lee
That's really fun. I love the site design, very slick.

Found a "bug". Some of the keyboard shortcuts conflict with my browser
shortcuts.

For example, in one of the emacs drills, to move down a line (ctrl + n) it
causes chrome to open a new window... so I could never complete the drill
because of this.

------
Xavura
Am I the only one that can't get this to work? First the legend shows a few of
the keys as ⌥.

Then, say for Sublime to cut a line it's ctrl+shift+k. It shows K.

So I try hitting ctrl then shift - nothing. I try typing ctrl then shift -
wrong. I try entering a caret (^) for ctrl - wrong.

Just what are you supposed to do?

------
chewxy
Wow, this is actually fairly awesome. Works better than the vim cheatsheet I
have hanging next to my monitor.

That said, the site can be pretty confusing. What's the difference between
practice and drill (other than slight interface difference?)

~~~
alaithea
Seems like the drills count towards your accuracy scores, while practice does
not.

------
BHSPitMonkey
It would be nice if the prompts at the end of sections could be easily
keyboard-activated. (For instance, the "Start Drill" button that I have to
take my hands off the keyboard to click.)

------
kecebongsoft
This is great, I've seen a web game that you can use to practice vim
schortcuts. But since this one's about building muscle memory, I don't see how
this is going to be better than the actual use of the editor itself. Using the
actual editor not only gives you the actual feeling but also challenge you
with the real text editing tasks. CMIIW. But this is still useful if you just
want to see a cheatsheet or not knowing certain shortcuts in the editor.

~~~
BrixtonBoy
I think the point is that when starting out with a new text editor you aren't
moving fast enough to use these shortcuts that often, so it's harder to
internalize them. With this you just get rapid repetition, so that when it
comes time to use them you have the command at the ready in your head. Of
course I'm speaking from the point of view of someone just starting out using
an editor. For someone that has already used any of these editors for any
length of time this sit does seem kind of worthless.

------
nicholassmith
This is great, similar to the code drills posted a couple of days ago, pretty
good way to get that crucial memory in place. Did drill, would drill again.

------
vadman
I have to enable way too much stuff in NoScript to proceed when I actually
click on an editor button. Giving permissions just to shortcutfoo is not
enough. NoScript also shows airbrake.io, stripe.com, olark.com. I don't know
what any of those are, so I'm not enabling them. So I cannot use your website,
as cool as the premise sounds :/

~~~
dchuk
In order:

1) exception tracking api 2) payment processing api 3) live, on-page chat tool

noscript is cool and all, but those 3 above listed items are perfectly fine to
permanently enable on all sites

~~~
Ricapar
I would argue that #3 would be one I'd like to have blocked. I've never had a
situation where those "Hey! Wanna chat with a salesperson!?" boxes isn't
annoying.

------
dbalatero
I only use vim, and from using this site for 3 minutes there's clearly plenty
of knowledge that I'm missing. I really wish that it would teach me the
commands it was drilling me on, and not just expect me to know the key
strokes. I know I can pull up the shortcuts reference, but I feel like it
should train and hint, then drill.

------
username3
Some keys are confusing to read under the pulsing cursor. | overlaps b, k, h.
e.g., h look like n.

Add a shortcut key for Start Drill!

------
afterburner
I feel like this is the equivalent of obsessing too much about going to the
gym. What about good old "on the job training"? The shortcuts you need, you
will eventually internalize... instead of using up time on an exercise like
this. I mean, it might give some benefit, but is it worth the mindlessness?

------
jay_kyburz
What I found missing in this is _why_ I would want to jump to a matching
bracket, or insert a line before.

Perhaps the game should be to transform one block of code into something
different in as few keystrokes as possible.

I would love to see videos of people using commands that are not a part of my
current vocabulary.

~~~
pyrhho
> Perhaps the game should be to transform one block of code into something
> different in as few keystrokes as possible.

Related, <http://vimgolf.com/> but vim-specific..

------
nicpottier
Neat.. kinda fun.

One thing is you might want to allow people to configure the META key. I have
Emacs set up so that the Command key is META, so all my muscle memory is
ruined when trying to run through the drills.

But I like the concept and might use it to increase my shortcut kung-fu.

~~~
watterssn
Command key now works as META for Emacs. Thanks for the suggestion!

------
bostonvaulter2
I think a cross between this and vimgolf would be really good. Basically where
you just get things you need to do like changing the paragraph formatting and
you just implement them to help you get in a state of flow with your editor.

------
calydon
A great idea.

Ctrl-shift-T is the key for repeating duplication in Photoshop, but it's also
the shortcut for create the most recent tab in Chrome, so it's impossible to
enter it unless you change your browser settings, which I'm not sure I want to
do.

------
thread79
I thought this was a great idea. But I simply am an idiot and can't figure out
how to use it. They tell you to type these || characters and it always spits
back a fail when I try it. They need more user testing feedback.

------
aneth4
Love the concept, however this is much like learning a language by learning to
translate.

求 -> ball -> O (actual ball)

vs

求 -> O (actual ball)

Classic study vs immersion.

The implementation will be much harder, but for this to be effective show the
manipulation, not the description.

------
ereckers
It's nice, but I'm not sure that's how my mind works when I'm working in VIM.
I wonder how I'd react if I was put in an actual document and then prompted
somehow to do the same exercises.

------
pacomerh
This is a fun project. But I'm not sure about the 5 bucks. Seems like it's
begging to be rich too soon. This app is just revealing information you
already have on a cheat-sheet.

------
Hilyin
I found it confusing because it was using capital letters when shift wasn't
implied. So I'd hit shift to capitalize like it displayed and it'd be wrong.

------
Ives
Hmm, I seem to be having a font-related problem, both CTRL and ALT symbols
show up as (empty) squares. I'm running Chrome 22.0.1201.0 dev-m on Win7.

------
wowzer
I really liked this. Unfortunately emacs bindings are the same as browser
bindings so I kept killing my browser session and or browser tab.

------
borplk
Can it be easily extended to add new editors? Perhaps you can let the users
submit packages for their favourite editors...

------
wim
This looks cool. Maybe you can consider a similar format to learn languages
(e.g. memorize words or grammar rules?)

------
gingerlime
Nice. Is there more info about how you wrote it? Which platform is this
running on? Which tools you're using etc?

------
gcv
Neat. But I have Emacs configured to use the command key as Meta, so this
needs to be configurable in the drills.

~~~
danielweber
I've also used too many terminals that didn't pass through Meta that I often
use Escape instead. That didn't work.

------
thomasjoulin
That's great, but you should accept all valid shortcuts. Move to beginning of
line in XCode is ^A as well as ⌘←

------
suby
Seems rather pointless. If a command is useful, you'll get muscle memory from
actually using it.

------
samspot
My pinky hurts after using this for sublime for a few minutes, and I'm getting
emacs flashbacks!

------
asifjamil
Anyone else experience out-of-whack CPU usage when loading up a tutorial?

------
coleifer
In the absence of textual context its hard to find these drills helpful

------
durga
Awesome! Been subconsciously looking for something like this for ages..

------
johncoltrane
Well executed. `dw` is not "delete word", though.

------
tunnuz
My vim doesn't get the ^ keypress :(

------
jvc26
Brilliant piece of work - nice one!

------
5teev
No BBEdit. _sigh_

------
evjan
Wow, this is great!

------
thekungfuman
Not only is this a beautiful and helpful web app, but it supports many
different editors instead of taking part in the text editor wars.

~~~
morsch
No support for Eclipse or IntelliJ IDEA or, heck, Netbeans, though.

~~~
jussij
It's also missing the Brief keyboard mapping :(

