I was wondering did any of you had any performance issues with Vim (terminal MacVim) + tmux + iterm?
I’m experiencing some pretty noticeable lag when using vim in iTerm. This also drew me to start using gui macvim, but I miss the whole terminal (development) environment. I recently went all in on experimenting with my vimrc, but no matter what I do I can’t improve vim’s responsiveness. It’s still quite slow.
I reduced my config and plugins list as much as I could, went through dozens of “vim optimization” blog posts, and still, nothing helped.
What stuns me even more is the fact that in every upcase/thoughtbot video everyone are using vim in terminal without any issues at all.
Not to mention @christoomey 's dotfiles which are huge, and still, every video shows him “flying” through all the vim’s magic with no lag/delay/slowness whatsoever.
Another thing that makes me wonder where I went wrong with my configs is that this issue keeps me haunting on multiple mbp machines (mid-2014 13" and mid-2015 15" - both standard ones)
So, I present you with my vimrc, vim boot time log and tmux config:
@aradunovic Did you ever resolve your performance issues?
If so it would be really helpful to other people if you posted your strategy and solution here
If not, is there anything “we” can help you with to further the research/debugging?
Starting vim with the --startuptime time.log flag can be useful to see what parts of your system started slowest. The second column is each piece’s individual contribution to the startup time for Vim.
Thank you all for your replies. Sorry for not being able to respond in quite some time. I’ve been busy as hell.
In the meantime I’ve made a switch to Neovim with addition of vim-test, neoterm and fzf plugins. This setup made tmux (almost) obsolete for my everyday work, including some of the vim plugins I was using earlier.
I’m not experiencing any performance issues whatsoever.
However, for future reference and possibility of helping someone with similar problems, I’ll answer your questions:
There were so many plugins I installed and removed during this whole process, I can’t even remember. I was always managing my plugins with Plug (install/clean).
The lag is present in autocomplete, opening files with more than around 200 LOC, opening files after searching with CtrlP, etc…
I went through that lazyredraw issue, removed the setting and nothing changed
The slowness is even more noticeable when running inside tmux
Without loading vimrc, everything runs smoothly. I didn’t have enough time lately to go through with the enabling setting by setting…I realize this is my best shot to find the cause of the issue.
One more thing, I installed thoughtbot’s laptop script with dotfiles and the lag was very much present.
The issue was present even while I was on Yosemite. I haven’t tried building Vim from source, though.
I see now there are couple of more things I could try to resolve this issue. So, I’ll try enabling settings and plugins one by one and see what happens. If I come up with nothing I’ll try building from source. Either way, I’ll report my findings here!!!
I just ran through the tmux trail and ran into a very similar issue. Vim would run perform normally until the either the iterm window was resized or the window was split from tmux. At which point Vim would become unbearably laggy and unusable.
The lag would persist even after closing the window/pane and even session. The only way to fix it was to close iterm completely and re launch. Vim would perform normally until the iterm window would be resized.
Removing all plugins didn’t resolve the issue and would occur outside of tmux sessions. Which is odd, since I wasn’t experiencing this prior to installing tmux.
I discovered that setting lazyredraw in addition to ttyfast in my .vimrc solved the problem even with all my plugins re-enabled.