Regarding the point about autocompletion: If autocompletion is needed don't use vim or emacs, -use Netbeans or eclipse, both excellent, free (both ways) and open source.
vim is great and I use it all the time but not for Java and PHP where the IDE support is so good that it really makes a difference.
> If autocompletion is needed don't use vim or emacs, -use Netbeans or eclipse, both excellent, free (both ways) and open source.
Vim also contains excellent autocompletion (several kinds, actually, most powerful of which is the omni complete) but it's not restricted to one language. It may, however require you to install your language specific plugins. Vim ships with C and C++ mode, which requires you to build a ctags database of your source code. In addition you might want to add cscope for source code navigation.
Eclipse has autocomplete perhaps for a handful of languages but Vim has support for autocompletion in tons of languages.
In addition to omni-complete, vim can have an user defined completion (C-x C-u), which is handy to set to do syntax completion (set completefunc=syntaxcomplete#Complete). Vim ships with tons of syntax files, which are used for completion and syntax highlighting. This is not super useful for programming, but is excellent for different kinds of configuration files, so you don't have to memorize (or look in the manual) for the configuration options you use.
And I'd rather use Vim without autocomplete than have to deal with Eclipse. Thankfully I don't have to.
I like to use eclipse with the vrapper plugin. That way I get the completion and refactoring of eclipse as well a decent set vim key bindings. Vrapper may not perfectly emulate vi/vim but it does the basics well. And when I need to use advanced vim features (eg macro magic) I just open the file in vim.
To me the IDE features make up for the minor annoyances of using vi/vim emulation.
For most languages (however, notably not Java), Emacs can have great auto-completion. I personally really like auto-complete mode. It might take a little bit of effort to configure auto-complete mode to work very well with your favorite language, but I've found it well worth doing: it's far, far easier than learning some new editor and lets me keep using the rest of Emacs's great features in any language I happen to be using.
EDIT: Reading some other comments, there is Emacs-eclim that gives you Java IDE features inside Emacs. So forget what I said about Java: Emacs can now handle even Java well!
For dynamically typed languages, Emacs can essentially be as good as possible fairly easily. I've been using it for JavaScript and Racket lately, and it's been really great for both. For statically typed languages, there are often type-aware tools that make it as good as any IDE--for example, I've used TypeRex[1] for OCaml; there is also ENSIME[2] for Scala and similar tools for a bunch of other languages.
Just because Emacs is a great text editor does not mean it isn't a good IDE. It has some very good support for a whole bunch of languages. I'm under the impression that Java is an exception to this rule, but I really don't know--I haven't used Java in a couple of years and really hope I will never have to use it again.
So, all told, I think this oft-repeated advice to use an IDE instead of a text editor like Emacs is misguided: Emacs is much more an IDE than just a text editor. Perhaps it's accurate for Vim, which I've never used (and I wouldn't be surprised if Vim support IDE features well too), but it isn't anywhere near true for Emacs.
Dumb autocompletion easily covers 50% of my cases and with Emacs hippie-expand (or one of its modern siblings) up to 75%: http://emacswiki.org/emacs/HippieExpand
That said, Emacs and Vim also have intelligent autocompletion depending on the language and support for it has only been getting better.
I concur - Java dev off Eclipse can be a complete nightmare. I used to be a hard core vimmer/command liner - until I realised 2 things:
1. The vast majority of things that I did were repetitive and were already solved in other environments
2. Knowing the minutiae of the stuff that I know now does not improve my skills at all - production matters for shipping, minutiae matters for interviews. Best way to get a job is to produce so much - you don't have to interview :D
Now I just use whatever is the most widely deployed, best supported environment for each language (e.g. Visual Studio for C++ and Eclipse for Java).
The one thing I have kept is my vim foo by using IDE specific plugins :D. Pick your tools carefully - and don't fall into the "true final solution trap" that people try to sell you.
This is so wrong. vim has eclim, which is a bridge to Eclipse (you can either run Eclipse visually or use Eclipse in server mode) and provides all the Eclipse auto-completion. It just works.
It actually works so well that the "emacs eclim", based on eclim, "Just Works! [TM]" and gives you, right inside Emacs, the Eclipse auto-completion.
Even when stuck in the Java/ORM/Hibernate/SQL/XML hell (at which point I want to kill myself and really question the company's "productivity"), I'd still rather use Emacs + emacs-eclim then Eclipse (or IntelliJ IDEA -- which gives both NetBeans and Eclipse a run for its money btw).
Thing is: adding Eclipse / IntelliJ support to vim / emacs is not that hard. But turning the "text editor" part of Eclipse into Emacs just looks like mission impossible.
IIRC using eclim you can replace the (very lame) text editor of Eclipse with vim. So you get vim running right in the middle of your Eclipse.
vim is great and I use it all the time but not for Java and PHP where the IDE support is so good that it really makes a difference.