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

Let's exclude Java for a second, as it's verbose syntax and baroque directory structures almost require you to use an IDE. My languages are Python, C, C++ and some Haskell and Clojure.

> code completion:

Vim has Omnicomplete. But usually I find it easier to have a web browser side by side and look up function names, in the case I don't remember.

> inline docs

Same here: mostly by memory, and always a web browser open

> refactoring

I do these by hand, usually assisted by the venerable "grep".

My typing is pretty quick, and it is almost never the limiting factor. My limiting factor is usually thinking about how to decompose a problem, and writing tests. Not sure an IDE can help me there.

That said, I should probably give an IDE a try sooner or later.




Ok, fine, but an Idea can save you from having to retype whatever your're searching for into a browser, plus semantic awareness.

For example, I'm currently editing a python file in IDEA.. I can easily, with one (chorded keystroke), see the definition of any symbol in my code, wether it be a local variable or a module. Similarly I can easily pull up docs, find any other usage of that symbol in the current file, etc. There is also high quality linting going on all the time, that will highlight things like unused variables, pep8 violations, etc.

Can you do all of this in VIM? Probably, but only with substantial effort.

As far as refactoring...IDEA goes way way beyond what you can do with grep.

For instance, say I have a function foo:

    def foo(x):
      return x * 2

    foo(3)
This is a trivial example, but just go with it.

What if I decide I need to multiply by things other than 2... fine,

    def foo(x, y): 
      return x * y

    foo(3) # Ooops, syntax error
Now, I can add y as an optional parameter,

    def foo(x, y=2)
... and that way I don't break code I've already written. But that may not be what I want - maybe I want to force callers to explicitly specify both parameters.

That's what refactoring comes in.

Refactoring -> Change Signature (Or just hit Ctrl+F6)

Now, add a new parameter, y, with a value of 2, and now any existing calls to foo across my entire project will have a second parameter of 2. No grepping or manual editing needed. This works reliably over a huge codebase with hunderds of files. Lets see you do THAT with grep. That's just a trivial example.

I can also easily extract a bit of code as a new function, and IntelliJ's code analysis will detect any values I'm closing over and default to those as the function parameters, and replace the original call site with a call to the new function. Again, totally useful, painless, and not doable with grep.


I find myself often using vim to write new code, and IDEs to perform routine adjustments like this one (or to do anything in Java). But, if I have to do really routine stuff, I bounce back to vim for the macro system, which truely blows away any IDE equivalent I've ever tried.

(Also, syntastic+pyflakes for vim provides auto-linting and pep8 checking automatically for basically no effort).


"My typing is pretty quick, and it is almost never the limiting factor."

Oddly enough, that's usually the objection I get when I tell people they should learn vim :)




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

Search: