Repo of the Day
tenderlove/initial-v
Published: Mar 3, 2023
Open repository ↗It's a BMW shifter converted to a Bluetooth Keyboard that you use with Vim - This cracks me up that people will build such cool stuff for just the challenge to see if it can be done. Love it!
Summary
Initial V is a hardware project that converts a BMW gear shifter into a Bluetooth keyboard tailored for controlling Vim. It pairs a custom PCB based on the ESP-MINI-1 chip, which reads the shifter's CAN bus signals, with a Vim plugin that keeps the physical handle in sync with the editor's mode. The repository includes the PCB schematics, 3D-printable housing files, firmware, a Vim plugin, and companion clients in Zig and Ruby.
What it is useful for
This project is useful for Vim users who want a tactile, mode-aware input device for common mode transitions, allowing them to shift between Normal and Insert by moving the handle into Drive or Neutral rather than reaching for keystrokes like i or ESC. It also serves as a reference for engineers building custom Bluetooth HID peripherals that respond to application state, since the design shows how a host application can send commands back to the device over HID. The hardware files double as a starting point for anyone hacking a BMW F-series gear selector, as the CAN bus decoding that makes the project work is credited in the README to external research by @projectgus.
How engineers can use it
Engineers can clone the repository and explore the pcb, housing, vim-plugin, firmware, and client directories for the schematics, STL files, Vim plugin, and Zig client respectively. On the host side, the Vim plugin detects mode changes and triggers host software to request a matching handle state change, closing the loop between the editor and the shifter. Host-side control is implemented through HID data APIs, with a Ruby script under firmware/ctrl.rb and a Zig client in the client directory for sending state updates back to the device. A documented limitation is that the author notes detailed per-directory build instructions are still being added, so engineers who want to fabricate the PCB or flash the ESP-MINI-1 firmware will need to follow the top-level README until those guides land. The README also states that Reverse on the handle has no Vim mode mapping yet, so a full gear-by-gear mapping table is not currently provided.