6 ms·
I began using Vim about a month ago and it has been totally revelatory to me, and believe quite honestly that it was the best career decision I've ever made. T
by cnp 12y ago
I began using Vim about a month ago and it has been totally revelatory to me, and believe quite honestly that it was the best career decision I've ever made. The one thing, however, is its speed. MacVim gets very slow sometimes, particularly with buffers.
So my question: How does Emacs and Vim compare speed-wise? I come from a Sublime Text background and really miss the ability to quickly navigate between tabs (buffers in vim), and sometimes it takes a full second.
- bdamm 12y agoEarly in my career I did a self-study of the entire vim user manual. My time has been repaid over and over, every single day, ever since. Normally vim is very snappy for me. Perhaps you have a ton of plugins that are clogging up your installation? Or perhaps just one very badly behaved plugin?
- mrpollo 12y agoI've been using MacVim for close to 3 years now w/o any slowness, CtrlP (plugin) sometimes gets buggy with large projects but aside from that buffer navigation is always good, but then again I'm running on SSD and maxed out ram on my mbp. I also use Janus https://github.com/carlhuda/janus https://github.com/carlhuda/janus so i might be a victim of improvements made by them. Speed is the #1 reason I switched to Vim
- brandonmenc 12y ago> it was the best career decision I've ever made I hear this a lot, and I'm not debating whether it's true or not since ymmv. I'm curious if anyone here has gone the other way. I used vi in my teens then switched to emacs, which I used for over a decade. A couple years ago I switched to JetBrains IDEs and have never been happier. I hadn't used an IDE since Borland Turbo C, and forgot what I was missing. Are there any other former vi/emacs users (like, hardcore - I used to browse the web in emacs) who ditched it for an IDE? I found that the mouse really wasn't a productivity killer for the few times you need to use it in a modern IDE.
- crazypyro 12y agoI think the main thing is some developers never use keyboard shortcuts until they are forced to with vim.
- throw_away 12y agoI only started using intellij because it was the first IDE I'd ever used that had a decent vim keybindings plugin.
- yla92 12y agoI used Eclipsed(ADT) and now using Android Studio. Eclipse has the decent vim plugin too. It can detect your vimrc and you can use your key-bindings. Only a while ago, Ideavim has this features where you can load the config with ~/.ideavimrc . Overall, IntelliJ is nicer IDE than ADT
- girvo 12y agoOne of the reasons I adore Komodo IDE (apart from it's excellent Python and Javascript APIs, and the fact that it's XUL based so building plugins is just like building them for Firefox) is the excellent Vim-mode it has built in. It's super extensive, one of the best emulations I've ever used.
- girvo 12y agoOne of the reasons I adore Komodo IDE (apart from it's excellent Python and Javascript APIs, and the fact that it's XUL based so building plugins is just like building them for Firefox) is the excellent Vim-mode it has built in. It's super extensive, one of the best emulations I've ever used.
- cageface 12y agoI was a hardcore emacs user for over ten years but the extra features I get with a really good IDE like IntelliJ are worth the switch, IMO. Now I only use Emacs for quick & dirty edits.
- sjy 12y agoIDEs can be great for writing code for particular platforms — I don't think there are many people writing Objective-C or C# in vim — but it's hard to imagine "ditching" a general-purpose text editor for a platform-specific IDE.
- dopamean 12y agoTry terminal Vim. I don't use MacVim and have very few issues with sluggishness.
- cnp 12y agoI started with terminal Vim, began having issues with redraws, and made the switch. I find that MacVim is faster and more stable.
- scintill76 12y agoMacVim is faster, except when it's not? :P I wonder if the redraw issues were the fault of your terminal emulator rather than vim. I don't have a lot of MacOS experience, though.
- sigzero 12y agoI use MacVim in the Terminal as well as a GUI.
- jzelinskie 12y agoTry putting `set lazyredraw` in your .vimrc
- vectorpush 12y agoTry switching to a different terminal app. I get excellent performance running vim and my entire dev environment in tmux. I also find that the performance is pretty consistent whether I use chrome-ssh, cygwin, gnome-terminal or konsole. Honestly, I'd be surprised if any modern GUI toolkit could compete with a curses app in terms of display performance.
- wincent 12y agoThere's no normal workload under which Vim should ever slow down noticeably. I routinely have long-lived Vim instances with hundreds of open buffers, and some of the files can be quite healthily sized (tens of thousands of lines). It should even be fine for "pathological" cases (multi-megabyte log files, files with stupidly long lines etc).
- cnp 12y agoI've been wondering lately if it has something to do with Airline. I'm using its visible buffer display and when doing C-movement s between buffers it feels so terribly laggy (on a top of the line MB Pro). When switching via ctrlp everything is instantaneous, but that requires more commands than just C-k or C-j.
- crazypyro 12y agoIsn't it possible a good number of people install addons that cause noticeable performance hits?
- graywh 12y agoSyntax based folding can slow it down a lot, especially with Ruby code.
- robbles 12y agoTry running it with `mvim -u NONE <filename>`. That disables all initializations from your .vimrc, plugins, etc. so you can see how fast "vanilla" vim is.
- SeoxyS 12y agoIn 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.
- staticshock 12y agoYes, 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 https://github.com/dahu/bisectly
- mifix 12y agoAnother 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.
- taeric 12y agoI'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.)
- kerkeslager 12y agoI am not an Emacs user so I can't answer your question there, but I thought you might want to know that I experienced the same issues with MacVim and speed. However, Vim from the terminal works a lot faster for me. Using it from the terminal also removes a lot of your crutches, and forces you to do things the Vim way rather than the GUI way.
- atmosx 12y agoTry using terminal's vim. Works better for me, I rarely use MacVim.
- godDLL 12y agoThere is VimR, Vico and a plethora of other editors that support the VIM paradigm to an extent. You should be browsing around.