Skip to content

Instantly share code, notes, and snippets.

@ptgamr
Created December 7, 2018 22:20
Show Gist options
  • Save ptgamr/c8ff6a717bd0640d47433b52b342417b to your computer and use it in GitHub Desktop.
Save ptgamr/c8ff6a717bd0640d47433b52b342417b to your computer and use it in GitHub Desktop.
Slow Vim on Mac

https://www.reddit.com/r/vim/comments/7fqpny/slow_vim_scrolling_and_cursor_moving_in_iterm_and/

i guys, I'm desperate :c Just bought my new MacBook pro 2017 and was very happy with it for a while until I decided to configure my vim. On Linux vim works just fine, scrolling is always ok even with a much faster cursor speed than I have now on mac. But lately I spent a WHOLE day trying to figure out what's wrong with scrolling speed on mac. It drives me insane. Both terminal and iterm are extremely slow at rendering and even moving the cursor around without scrolling at all is laggy!

I think I tried almost all the possible suggestions including

setting ttyfast and lazyredraw

speeding up my key repeat to 1(scroll is faster but even more laggy)

launching vim without plugins and syntax on(which speeds it up a little but still it's too slow).

no background\blur

font is default Monaco

The only thing that works is to make the terminal window small like 1/8 - 1/6 of the screen but that's obviously not an option. I ended up installing MacVim but I wouldn't say it's insanely fast as well, it's better but there are still noticeable lags when in fullscreen mode. It's just so frustrating to buy such an expensive laptop to discover it can't simply render an old-ass text editor :( So my question: is it something wrong with my mac/vim or do you guys just live with it and use it as it is?

BTW more and less commands have the same issue as well, not that much laggy, but scroll is also slower in larger terminal windows.

I'm using MacBook pro 15" 2017, High Sierra. Cores are totally fine and there are about 8gigs of free ram left.

EDIT: Thanks for all your help guys! Didn't expect to get so many replies. That's what I've tried:

All the vim configuration options like lead me to a small increase of speed. They're: set regexpengine=1, set noshowcmd and set synmaxcol=200. I wouldn't say it's a giant speed increase but still pretty noticeable

The issue is mainly the terminal's redraw speed, it has almost no connection to how vim works. Except for some options like cursorlinethat lead to a whole window redraw as well.

I installed alacrity(though it wasn't that easy c: ) and it's pretty dope! It's even faster than my Linux, feels smooth as butter. The only thing that may scare you:

it has no tabs, so tmux is the only option

configuration through .yml only

not sure how many features are implemented but I think significantly less than iTerm has

What I came up with: I've always had my vim opened on a separate workspace so it won't be a problem for now but I'm going to further discover alacritty's features and maybe stick with using it instead of iTerm in the future, thank you all guys!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment