Article 3J0J0 "The Vim Clutch": a footpedal for the code-editor Vim

"The Vim Clutch": a footpedal for the code-editor Vim

by
Clive Thompson
from on (#3J0J0)

vim-clutch.jpg

Vim is a text editor greatly loved by many programmers, because of its radically keyboard-centric design.

When you're coding in Vim, you generally never touch the trackpad or mouse; everything is done with the keyboard. Indeed, your hands don't even move around very much on the keyboard, because Vim doesn't even use the arrow keys. To move the cursor left by one character, for example, hit the "h" key. The "l" key moves you one character right, "k" takes you up one line, "j" down one line. There are also tons of clever little key-commands that speed up text-editing: Type "dw" and it deletes the word you're currently on, type "d$" to delete to the end of the line.

The upshot is that once you've mastered Vim, there's a glorious feeling of Csikszentmihalyian flow: Your fingers move in a blur of supremely economic, efficient movement. Your fingers spend far more time on the home-row keys.

But wait, you might wonder: How does this work? What if you want to use h/l/k/j to type letters, not to navigate?

Well, Vim has two modes -- "command" and "insert" mode. You enter command mode to use all those nifty shortcuts, and go back into insert mode when you want to type text. When you write in Vim, you're constantly shifting back and forth between those two modes, using the "esc" key to enter command mode.

That shift -- between those two modes -- is the only thing I've ever heard coders occasionally complain about with Vim. It's the only thing that seems to (sometimes) trip up their flow. (You have to reach up to hit the "esc" key enter command mode.)

But hey! The programmer Aleksandr Levchuk hit upon a clever way to solve this problem: He created a USB footpedal. Put your foot down, and you enter command mode -- lift it up, and you're back in insert.

It's the "Vim Clutch".

When I tweeted about it this morning, coders around the world alternately a) squeed in delight or b) tsk-tsked at the madness of their peers ... https://twitter.com/pomeranian99/status/973022871311257601

Me, I don't use Vim; I tried it but never spent long enough to build up the muscle memory. But I'm a touch-typing keyboard freak, and I love the idea of adding more ways to key on a computer. I'm pondering now what ways I could rig a footpedal to pull off complex key-command chains in other pieces of software ...OBRTmuflCGo

External Content
Source RSS or Atom Feed
Feed Location http://feeds.boingboing.net/boingboing/iBag
Feed Title
Feed Link http://feeds.boingboing.net/
Reply 0 comments