by dljsjr · 13y ago · 0 comments
There are still 2 things that I can't give up that IDE's do better than vim (in my opinion):
1. Refactoring operations. I have yet to find a vim plugin that has the extreme refactoring awareness I've become accustomed to in IntelliJ IDEA and Eclipse. And writing a macro to do it for you is not the answer, because these tasks are non trivial to do a.) correctly, b.) in the general case, and c.) across an entire codebase. There's a reason people have sunk a gazillion years and R&D dollars in to creating IDE's, and some bullshit vim macro that I put together mid-day on a Thursday because I need to extract a method isn't going to compete.
2. Super-powerful auto completions. I get that vim has code completion plugins, and most of them are good (I'm currently using YouCompleteMe). But they aren't great. IntelliJ has it's legendary "index the world" mentality, and is really great at fuzzy match finding. Eclipse is a little clunkier, but its ability to drop in the entire method signature and provide tab-stops for quickly filling in the parameters is a boon.
The majority of my bias towards these features probably comes from the fact that I write Java code for a living at my day job, where the "documentation" is actually the code completion popup 90% of the time and most file operations or refactors are accompanied by some degree of boilerplate that is handily automated. Say what you will about verbose code and "enterprise" languages, but learning an API as you go by mindlessly mashing Ctrl+Space and skipping the inheritance/implementation rain dance is a huge productivity gain.
I do all of my C/C++, Haskell, HTML/CSS/JS, and Ruby in vim, where I have a pain-stakingly customized pathogen setup that I sync across all of my computers (personal and work). Code completion is good enough, between YouCompleteMe and ctags, but I still miss refactoring something fierce. But if FP Complete releases their Haskell IDE tomorrow and it isn't completely offensive to look at (Leksah!), has good refactoring, and has good code completion, I'd jump ship in a heartbeat.
I don't think that the whole IDE vs. vim/emacs war is real. I think that they're two completely different tools that are good at very different things; I will not argue that I am way, way, way faster at just editing text in vim; EasyMotion, ctags, never having to use a mouse... I love these things. But anybody that writes off an IDE without fully understanding just how powerful the two features I mentioned above can be when dealing with multi-million loc codebases is being narrow minded.
I'd rather have a language that didn't demand lots of tooling. Lots of tooling is expensive, unreliable and a time sink.
Which is why I like vim (and have used it for 16 years) :)
Many times I have thought that len was a method on any string...
Jedi seems to work as intended, but it crashed occasionally so I uninstalled. I'm fairly certain that if you really want autocomplete, you can get it working with vim.
This is why for me "free-form refactoring without relying on fixed-form refactoring routines and plugins (i.e not just a glorified search and replace)."[0] (which is a comment by myself made 6 days ago, that actually makes the same point as TFA) is extremely important.
As for discovery through autocompletion, I find my need for it has been greatly reduced these last years, with a growing number of APIs that "make sense", hence discovery happens in your head, not on the screen. If the API is obtuse to the point it doesn't fit in my head, then I usually need the doc so I'll have it open nearby anyway.
I use the VSVim plugin in Visual Studio and IDEAVim in IDEA/RubyMine and they work great (ideavim is kind of lame as it has no real keymap support, but its better than nothing).
File > Preferences > External Tools
Program: /Applications/Emacs.app/Contents/MacOS/Emacs
Parameters: +$LineNumber$ "$FilePath$"
Working Directory: /Applications/Emacs.app/Contents/MacOS
Then I map a key to open this (Cmd-E)
On the emacs side, I have the following to pick up changes to an open buffer that were made in Intellij
(global-auto-revert-mode 1)
Yes! This is the crux of the confusion. Working with a multi-million LOC codebase is a very different problem than a 10,000 LOC codebase. Java+IDE is better for the former; dynamic language + text editor is (usually?) better for the latter.
When people voice angry opinions about static vs dynamic languages, and IDE's vs text editors, they should preface with how many lines of code are in the typical projects they work on. It just changes your working assumptions.
New sig for me on forums ; )
Paraphrasing Rich Hickey: everytime you're using a "pattern" and have your IDE generate code for that pattern for you, then it means: "I have run out of language" : )
Bonus points if you use Heroku/EC2 or AppEngine and ignore the "giant ball of mud" that is a critical reason your business was able to launch.
I tried solutions for Eclipse back when I used it, but I couldn't find one that I liked.
Got tired of tiled windows crowding each "perspective", and constantly reaching for the mouse.
BUT there's light at the end of the tunnel: there's eclim (eclim.org), which allows you to use vim (the real one) as the text editor for Eclipse. Or if you want you can run Eclipse in headless mode and then have vim transparently contact the (local) eclim server and suggest you, right in your vim, the autocompletion hints from Eclipse etc.