Hacker News new | past | comments | ask | show | jobs | submit login

In Vim, a single badly-written plugin can make the entire editor feel sluggish. I'd recommend disabling your plugins one-by-one, until you find the culprit.



Yes, this is quite common. Come to #vim on freenode and we'll help you troubleshoot it. There's a large and welcoming community waiting for you over there.

Launch macvim as `mvim -u NONE --noplugin` and see if you can still reproduce your speed issues. If you can't, then your problem is not with vim, but with a plugin (or with your ~/.vimrc).

You can use bisectly[1] to do a binary search over your installed plugins looking for a faulty one. This is similar to how git-bisect works, and it's WAY more effective than disabling your plugins one by one. I've personally used repeatedly it to narrow down problems to vim-gitgutter, which is quite possibly the buggiest plugin I've ever used.

[1] https://github.com/dahu/bisectly


Another way to find the culprit is using vim' built-in profiler:

run :profile start filename, then :profile func * Then do the slow thing, and close vim. This will write your profile data to filename.


I'm curious how this isn't true in pretty much all environments. I guess I can understand how it might be heightened in vim. I can't think of anything that would prevent it elsewhere though. (There is also the odd incentive to have all plugins well written if the affect is pronounced.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: