• Stars
    star
    3,544
  • Rank 12,524 (Top 0.3 %)
  • Language
  • Created about 13 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A hardware pedal for improved text editing in Vim

Updates:

VIM Clutch by Aleksandr Levchuk

VIM Clutch is a hardware pedal for improved text editing speed for users of the magnificent VIM text editor (1, 2). When the pedal is pressed down, the pedal types "i" causing VIM to go into Insert Mode. When released, it types <Esc> and you are back in Normal Mode.

I just made one and it works great. Here is how I did it.

  1. Purchased 2 USB foot switches (pedals) from China: I used Ankaka.com and payed 20 USD (includes 2 pedals and shipping to California).
    Later I found out the OEM: PC sensor http://www.pcsensor.com/index.php?_a=viewProd&productId=2 $5.50 per pedal
    Also they sell these form Hong Kong:
    http://www.suntekstore.com/goods-10010504-pc_usb_foot_switch_keyboard_pedal.html
    http://www.suntekstore.com/goods-10012491-new_usb_fashion_action_control_keyboard_hid_foot_switch_pedal_.html

  2. The pedal is programmable via a Windows GUI or on Mac/Linux via https://github.com/rgerganov/footswitch CLI. Once programmed you can plug it into any Mac or Linux and it will work.

  3. Unfortunately, only the Pedal Down event is programmable. But we need to be able to press <Esc> as the pedal is release. I emailed PC sensor, reaching out to collaborate but I just got the pedals from the post office today and really wanted it to work. So I stated hacking at it and came up with a solution in a about 1 hour.

  4. I programmed one pedal to send the letter "i" and the other to send the <Esc>

  5. Took both pedals apart





  6. With electrical tape, attached 2 toothpicks to the plastic blade that goes between the Infrared sensors when the pedal is in the down possition.





  7. Placed both sensors boards into one pedal enclosure so that, as the pedal is pressed, first the toothpicks will cross the <Esc> sensor, and after that the plastic blade will enter the "i" sensor. As the pedal is release the toothpicks will cross the <Esc> sensor again.


Acknowledgments

I would like to say Thank You to:

  • Sean Mahoney for suggesting the name Vim Clutch.

  • Anton Polishko for suggesting pressing <Esc> every time right before pressing "i" in order to avoid typing undesired "i"s.

  • Tyler Backman for letting me use a Windows computer.

  • The company PC Sensor for building such a clean and incredibly inexpensive device.

Finally the first VIM Clutch

Has anyone thought of this before?

Perhaps, but I was not able to find any mention of using a pedal for Vi or VIM. I searched for this occasionally for a span of more than 2 years. Nothing like this comes up on Google. I shared my idea with a lot of my friends and no one mentioned that this was already thought of by someone else.

As a result I consider myself the inventor of the VIM Clutch.

Extras

PC Sensor also has a triple version of the pedal. I will order two of those as well. I will program:

  • The left pedal to "I" - insert at the beginning of the line
  • The middle pedal to "i" - regular insert mode
  • The right pedal to "A" - insert at the end of the line

License

Creative Commons License
The VIM Clutch work by Aleksandr Levchuk is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

More Repositories

1

pairwise-alignment-in-python

Pairwise string alignment in Python (Needleman-Wunsch and Smith-Waterman algorithms)
Python
96
star
2

minibank

Manual for building a Lightning Network node on RasPi hardware from scratch
Python
17
star
3

memtop

memtop - Like top and iotop but for memory and with shared memory pmap accounting
Ruby
6
star
4

pi-mastodon

Mastodon on a Pi via Tor
5
star
5

pstm

ps time machine
Shell
4
star
6

cellwall

Cellwall (UCR CWN) - Data processing and web-interface
Perl
4
star
7

uniprot-stats-history

Histroical Stats of Uniprot (Statistics Archive) See link directly bellow this text.
CSS
3
star
8

ms

MS thesis - improving multiple alignments by removing sequences
Shell
2
star
9

mash

mash - Multiple Alignment Score in HTML
R
2
star
10

hclust-fasta

Blast all-against-all and Hierachical clustering of protein sequences in FASTA
Shell
2
star
11

finding-the-sequence-of-a-domain

Answer to a Biostars.org question
Shell
2
star
12

kmercount-classifier

Shuffled or Real? Classification of protein sequences by using k-mer counts.
C
2
star
13

bio-makefile

Conventions in my bioinformatics computations
Shell
1
star
14

bcvss

Body camera video storage system
1
star
15

simplest-task-manager

A very simple human task management
Shell
1
star
16

nfsmon

NFS performatnce monitor
Ruby
1
star
17

lindy-effect

Statistical testing of the Lindy effect
R
1
star
18

pfam-clust

Find clusters of protein sequences that have the same sequence of Pfam domains
1
star
19

freezefsfreezer

freeze those who freeze the fs
1
star
20

fasta-to-mcl-to-spreadsheet

Takes multiple FASTA files: Species A, Species B, ... Clusters with Blast and MCL. Outputs a spreadsheet table showing which species belong to which clusters.
Ruby
1
star
21

torque-ameliorators

Ruby scripts for interigating cluster state via Troque
Ruby
1
star