DEV Community

Cover image for The 30-Second Hack That Will Speed Up Your Coding More Than Any Framework
Ackshaey Singh
Ackshaey Singh

Posted on

The 30-Second Hack That Will Speed Up Your Coding More Than Any Framework

As software engineers we're always chasing the next productivity tool. A faster build system. A smarter IDE. A new framework that promises to 10x our output.

More than anything else, this setting makes more of a 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 hjkl in vim
  • Navigating long file paths in the shell
  • Holding down arrow keys to select text

By default, MacOS has conservative key repeat settings - which makes sense because Apple doesn't tailor MacOS out of the box for keyboard first use. When you hold a key, there's a 225ms delay before it starts repeating, then it repeats every 30ms. 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. That's scrolling lag. Waiting for the cursor to catch up. The micro-frustration of mashing delete harder because it feels too slow. 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:

defaults write -g InitialKeyRepeat -int 10  # 150ms delay (default: 225ms)
defaults write -g KeyRepeat -int 2          # 30ms repeat (already at GUI minimum)
Enter fullscreen mode Exit fullscreen mode

Or if you want ludicrous speed:

defaults write -g InitialKeyRepeat -int 10
defaults write -g KeyRepeat -int 1          # 15ms repeat (2x faster than GUI minimum)
Enter fullscreen mode Exit fullscreen mode

Log out and log back in for changes to take effect.

Why This Matters for Developers

Terminal scrolling alone is transformative. 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.

The same applies to:

  • Code navigation: Moving through files in vim/emacs at the speed of thought
  • Editing: Deleting/rewriting code without the frustrating "hurry up" feeling
  • Command line: Fixing typos and navigating bash history instantly

Start Conservative

I recommend starting with KeyRepeat=2 rather than 1. The difference between 30ms and 15ms 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 go back:

defaults delete -g InitialKeyRepeat
defaults delete -g KeyRepeat
Enter fullscreen mode Exit fullscreen mode

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 within 5 seconds when it's missing.

That's why, after setting up my new MacBook and feeling that familiar sluggishness, I had to write this down.

YMMV. But 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.

Top comments (0)