The 30-Second Hack That Will Speed Up Your Coding More Than Any Framework
Source: Dev.to
Introduction
As software engineers we’re always chasing the next productivity tool—a faster build system, a smarter IDE, a new framework that promises to 10× our output.
More than anything else, this setting makes a more tangible difference to my daily coding speed than any tool I’ve adopted over the past decade.
Sound familiar?
Think about how much time you spend holding down keys:
- Scrolling through terminal output with arrow keys
- Deleting a line with backspace
- Moving through code with
hjklin Vim - Navigating long file paths in the shell
- Holding down arrow keys to select text
By default, macOS has conservative key‑repeat settings—there’s a 225 ms delay before a held key starts repeating, then it repeats every 30 ms. That might not sound slow, but over thousands of operations per day, it adds up.
I estimate this costs the average terminal‑heavy developer 15–20 minutes per day. Over a year, that’s roughly 80 hours of your life spent waiting for keys to repeat.
Do This
macOS allows you to set key‑repeat values below the System Preferences minimums via the command line:
# Faster initial delay (default: 225 ms)
defaults write -g InitialKeyRepeat -int 10 # 150 ms delay
# Faster repeat rate (default GUI minimum)
defaults write -g KeyRepeat -int 2 # 30 ms repeat
Or, if you want ludicrous speed:
defaults write -g InitialKeyRepeat -int 10
defaults write -g KeyRepeat -int 1 # 15 ms repeat (2× faster than GUI minimum)
Log out and log back in for the changes to take effect.
Why This Matters for Developers
Terminal Scrolling
When you run a test suite or check git logs, you’re not just scrolling—you’re scanning for errors, searching for context, navigating to specific lines. With default settings, you’re fighting the UI. With these settings, the terminal keeps pace with your eyes.
Code Navigation
Moving through files in Vim/Emacs at the speed of thought becomes effortless.
Editing
Deleting or rewriting code no longer feels sluggish.
Command Line
Fixing typos and navigating Bash history happens instantly.
Start Conservative
I recommend starting with KeyRepeat=2 rather than 1. The difference between 30 ms and 15 ms is enormous—1 can feel almost too fast if you’re not used to it. Give yourself a day to adjust.
If you want to revert to the defaults:
defaults delete -g InitialKeyRepeat
defaults delete -g KeyRepeat
A Decade Later, Still the Best Hack
I’ve switched between dozens of editors, languages, and frameworks. I’ve adopted and abandoned countless productivity tools. But this setting? I notice it within five seconds when it’s missing.
That’s why, after setting up a new MacBook and feeling that familiar sluggishness, I wrote this down.
Your mileage may vary. If you spend hours in the terminal every day, this is the fastest way to speed up your development workflow. Not a new language. Not a better framework. Just two commands and a logout.
Try it for a day. I bet you’ll never go back.