News for hackers. Stuff that matters.
Re:Vim clutch by grayrest on Thursday June 21, 2012 @08:29AM (#4141635)
> Has anyone thought of this before?

The 1992 paper "The Prevention of Mode Errors Through Sensory Feedback" [1] uses this exact mechanism.

[1] http://research.microsoft.com/en-us/um/people/asellen/public...

I've argued for years that vim is one of the few good examples of modal design since it allows for quick entry of the command grammar without modifiers and the command grammar is an excellent fit for the domain. Whenever I bring this up with an interaction designer, I'm told there is no such thing as a good mode. The citation chain has always wound up at this paper and while I generally agree with the paper's conclusion, I'm frustrated that the editor is used in the most inspid way possible to generate mode errors (at the rate of 3-6 in 10 minutes of editing...). The problem given in the paper is solved by `:%s/\<[A-Z]\+\>\zs/errorerror/g` and I could probably do it a half dozen other ways.

Every time I read the paper I tell myself I should make/acquire a pedal and try it out but I've always been too lazy.

Re:Vim clutch by acqq on Thursday June 21, 2012 @10:48AM (#4142242)
> Has anyone thought of this before?

Doug Engelbart (http://en.wikipedia.org/wiki/Douglas_Engelbart) around 50 years ago:

http://www.dougengelbart.org/history/pix.html

"other experimental variations were later built and tested, including foot-pedal operated, knee-operated, even head-operated ("nose pointing") devices."

Re:Vim clutch by goblin89 on Thursday June 21, 2012 @09:34AM (#4141881)
VIM clutch does not seem to prevent mode errors, though. For that pedals need to have feedback. I.e., if one hits 'a' out of habit or accidentally, stepping consequently on the insert pedal would predictably enter 'i' character. That would be avoided if the pedal changed to pressed state depending on mode.

That said, for me as a pianist the idea of mode pedal looks pretty awesome. It just needs to be developed a bit further.

Re:Vim clutch by grayrest on Thursday June 21, 2012 @09:47AM (#4141931)
Just need to make sure pedal down is idempotent. Having the pedal send something like Shift+F2 and then `nmap <s-F2> i` `imap <s-F2> <Nop>` takes care of that. Escape is always idempotent so no issues there.
Re:Vim clutch by aidenn0 on Friday June 22, 2012 @01:36PM (#4147772)
If you are appending to the end of the line <esc>i will move you left one character.
Re:Vim clutch by syaramak on Thursday June 21, 2012 @10:27AM (#4142120)
I believe that'd be a non-issue since the "i" is always preceded by an "Esc".