Besides using iTerm instead of Terminal.app for the key repeat issue, no other changes in how I was running Vim helped. Note that I did not mention using tmux over screen, or Neovim instead of Vim. All the tricks I currently know for dealing with slow scrolling in Vim. I don’t use this setting anymore because nocursorline was more useful.
It turns off syntax highlighting after a max column value, so lines longer than that abrubtly lose syntax coloring. Basically, it seems to limit the number of times Vim renders, which sped up scrolling for me. You can read about it with help lazyredraw. That’s kind of a bummer, but if it means I can scroll through HTML and Ruby files, then I’ll take it. It turns off the bar that highlights the current line you’re on. This setting had the most impact of the three. There are three settings that helped this on my systems. If you’re a programmer, that means a lot of files! And the problem affects more than just macOS. The magic KeyRemap4MacBook values for me were:Įven with fast repeat settings, Vim can slow to a craw while scrolling through files that have long lines, when syntax highlighting is turned on.
Iterm2 mouse scroll mac#
Scrolling with j and k was blindingly fast on Linux, but plodded along on my Mac so slowly that I began using Control-F and Control-B most of the time. When enabled, iTerm2 transmits a control sequence before and after paste operations (e.g., pressing Cmd-V).
There was always a marked difference between Vim on my Mac and Vim on Linux. Other times, the problem is really about Vim’s ability to render long lines with syntax highlighting.įear not! There are solutions to both problems. In some cases, the problem is OS-specific: key repeat settings can slow down scrolling with the j and k keys. Vim, Neovim, and MacVim can all exhibit slow scrolling in macOS.