Building a clutch for vim

Whether you’re using emacs, vi, or vim, your fingers will be performing acrobatics on your keyboard because of the mouseless interface. [alevchuk] thought his feet could be used as a way to reduce the amount of keystrokes, so he built the vim clutch. It’s a USB-enabled foot pedal that will insert characters before the cursor in vim.

Vim requires the user to type the letter ‘i’ to insert text before the cursor. [alevchuk] thought this function could be easily replicated by a foot pedal, so he found an extremely cheap USB foot pedal to serve as his vim clutch. Ideally, the pedal should send ‘i’ when it is pressed and Esc when it’s released. [alevchuk] took two pedals, programmed one to send ‘i’ and the other to send Esc, and put them in the same enclosure.

The result is a working clutch for inserting before the cursor in vim. [alevchuk] is looking into a three-pedal model to add inserting at the beginning and end of the line to his vim clutch, so we’ll keep an eye out for when he posts that build.

Comments

  1. gnomad says:

    must… restrain… from… making… Emacs… comment…

  2. slyclops says:

    I was going to suggest using eclipse instead, but the extra exercise required is intriguing. Now all you need to do is mount the pedals like a bicycle and use the rotation for scrolling the cursor.

  3. Rachie says:

    I thought it would make more sense for the pedal to work the other way around. Have the editor default to insert mode, and press the pedal to enter a command. Having to keep your foot in one place for long coding sessions seems awkward.

  4. draeath says:

    Seems to me it would make more sense to have the pedal enter a colon.

  5. Matt says:

    I’ve gotta say, as a regular vim user, I just don’t quite get this from a usability standpoint. The opposite behavior (insert mode on release, as Rachie proposes) makes a *little* more sense, but… the different commands to enter insert mode at different locations (A/a/S/s/R/I/i/O/o… did I get all of them?) are one of the subtleties of vim that gives it so much power. Done editing the middle of the current line and want to key typing on a new line below? ESC->o. Such movements become second nature after a while, and if you’re just going to be constantly using i-insert… you may as well not use a modal editor. This would be like someone adding a a pedal to hold down CTL for emacs; the speed of a keystroke is just gonna be so much faster and more comfortable than anything your foot can do.

    One idea to make it more comfortable that a lot of people do is use CAPS as an ESC key — most OS’s have the ability to disable CAPS functionality, and rebind it to ESC. It can be similarly useful as CTL, if your preference is emacs (slightly less pinky travel for a highly-used key in both cases).

    • rue_mohr says:

      now see I’m just attacking the problem by writing my own editor. When its done right, people will stop doing it.

    • Aaron says:

      Caps mapped to Esc is neat, except that Caps mapped to Ctrl is useful in places other than my text editor.

      I tried writing my own editor, too. Turns out you can do that with Emacs, except you don’t have to build the whole damn thing from scratch first. Very useful.

  6. nfritsche says:

    Actually using the pedal to enter the colon would not be that useful because a colon is on your home…..wait I see what you did there. Clever.

    For the record, no other editor comes close to vi.

  7. chapatt says:

    Cool idea, but I agree with Matt above, it’s not really useful. I would have to say that I don’t use i anymore than I use any of the other commands (I find myself using c and o more often, even).

    The foot pedal idea is still awesome, and I’m going to have to think up something cool to use one for…

  8. Petran says:

    how about wising up and de-geeking and switch to useable editor? notepad++, programmer’s notepad etc
    —rolles eyes…—

  9. tfer says:

    Mangle irons had a knee activated switch. How about a set of three knee activated switches, left => i, right => a, up esc, chord left-up => I, chord right-up => A.

  10. Rusty says:

    Why did I just type
    :q!
    to leave this webpage??? :-D

  11. freax says:

    I just knew when i saw it that it would start a emacs/vim war in the comments…
    I think its quite clever, because it solves the thing that annoys me the most when using vim: I forget to leave i mode, or I forget to get in it.
    Haven’t found the perfect editor yet… (well, I probably could configure either vim or emacs to work like I want, but I don’t have *that* much free time)

  12. viminizer says:

    How about a switch that actives when I clench my jaw?

  13. 0.zer0 says:

    As old as the vi(m)/emacs flame wars are, I still get a kick out them for some reason..:D

    vi(m)= A powerful, extensible text editor.

    emacs= A powerful, extensible OS with a decent text editor.

  14. barry99705 says:

    Does it emit a burning metal smell after a few hours of hard coding?

  15. Christoferjh says:

    Whyyyyyyy! So stupid solution… I have one… in linux i just remap, as any keycombo i want. You only need one pedal, unmodified…..

  16. Eddie says:

    i use midnight commander (sue me), no need for foot peddal.

  17. bob says:

    “because of the mouseless interface”

    FTFY: “if you’re using the mouseless interface”

    My trackpad works fine with vim.

  18. areiner says:

    Guys! CTRL-[ is a universal escape key that works in any incarnation of VIM/GVIM. That’s control-left-square-bracket.

    I never understood why vim forces you to remove your left hand from the home keys to get out of insert mode, and I almost gave up on vim before I found out about it. But I discovered CTRL-[ and always wondered why they don’t make it any more widely known!

  19. Renate says:

    Two devices, two cables and two USB ports for a single switch?
    With the right software both the down and the up could be separately configured.
    You’d only need the unmodified pedal.

  20. nebra says:

    uhhh, 2 things
    1 – : might be a more sensible clutch
    2 – its not an editor, its a ‘way’

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 92,115 other followers