Choppy scrolling in iTerm2
Last time I’ve used macOS was back when I was in college. Since then, I’ve been on either Debian or FreeBSD. Fast forward to 2025, I ended up on macOS trying to recreate my workflow that I had on a Linux distro.
One of the first starting points for me is to get a good terminal emulator. I’ve been a long time fan of both kitty and tilix. When it comes to macOS, my terminal emulator choice used to be iTerm2. Nowadays there are other options, but I decided to see how iTerm2 evolved over the years.
I grabbed the latest binary, and took it for a spin. The first problem I’ve encountered was choppy rendering on a rather small (~400 LOC) file using Vim while navigating up and down. I started searching online trying the find the cause and it ended up with me making sure that these settings were in place:
- Enable GPU Rendering.
- Prefer integrated to discrete GPU.
None of these settings improved the issue, so I decided to run the experiment with the FPS meter turned on. It showed me frames around ~1-15 per second both in my 120Hz and 144Hz monitors, and almost no GPU usage which confirmed my suspicions about the lack of perceived smoothness. So back into web searches I went.
As I read through different discussions I noticed a pattern emerging, users were saying iTerm2 was slow compared to kitty, Alacritty and a newer contender in the block, Ghostty. Here are some benchmarks provided by the author of Ghostty.
After reading these, I decided to try kitty first since it was something I was very familiar with. I got the emulator downloaded, jumped into Vim, opened up the same file and started navigating down towards the EOF. Result? The same thing. The navigation choppiness was exactly the same. After hitting dead end after dead end with only a handful of people complaining about the same issue with keywords like “slow iTerm2”, “iTerm2 low FPS when scrolling”, “slow Vim scrolling in iTerm”, I struck gold.
Turns out, by default, the key repeat rate in macOS is not fast. After setting it to the maximum value allowed by the system settings GUI, I’ve noticed some improvements.
And then I checked the actual values:
$ defaults read -g InitialKeyRepeat
30
$ defaults read -g KeyRepeat
2
I updated the values:
$ defaults write -g InitialKeyRepeat -int 10
$ defaults write -g KeyRepeat -int 1
I went back to the same file I was testing with Vim and the navigation was dizzyingly fast and smooth. I went back and forth with iTerm2 and kitty, and the experience was identical. Smooth and super fast. In fact it was a bit too fast for my liking so I slowed the KeyRepeat rate by 1.
$ defaults write -g KeyRepeat -int 2
And the result was exactly what I wanted. I’m writing this for others who’ll experience this issue in the future (and quite possibly myself) so that you don’t waste the time I’ve wasted figuring this out.
As of now, I’m quite happy with iTerm2 and I really want to dive into why the key repeat rate is set to such a slow amount in macOS, but alas I have work to get back into…
P.S.
This story took place in:
macOS 15.4.1 Sequoia
iTerm2 3.5
kitty 0.41.1