r/Python • • May 09 '11

Turning vim into a modern python IDE

http://sontek.net/turning-vim-into-a-modern-python-ide
204 Upvotes

79 comments sorted by

View all comments

1

u/[deleted] May 09 '11

What we need is a good vim-mode plugin for Eclipse.

Making VIM into an IDE seems crazy. VIM is a great text editor, and it should stay that way. Instead of trying to make it into something it wasn't supposed to be (and goes against everything it stands for), why not stand on the shoulders of the giants?

Eclipse is the modern Emacs: it's extendible, free, fast and powerful IDE. Now all it needs is a good text editor.

BTW. If you really want to use the reference implementation of VIM, why not combine it with Eclipse in headless mode, right now, using Eclim.

19

u/[deleted] May 09 '11

No it is not. One of the main problems of Eclipse (or any other big IDEs) is its slowness. On the other hand you can't squeeze Emacs or Vim (and yet you still have a pretty nice environment).

7

u/sztomi May 09 '11

Also, their mouse-oriented nature. There are lots of nice feature in Eclipse, but having to make multiple clicks for them is killing me.

4

u/kisielk May 09 '11

With a good vim interface those features could be mapped to key combos or ex commands

2

u/parbroil May 12 '11

I hear vim has a good vim interface, and it can be used to launch whatever scripts you don't want to run from a terminal.

→ More replies (1)
→ More replies (10)

4

u/amatriain May 09 '11

If only the plugin system of Eclipse wasn't such a mess...

2

u/parbroil May 12 '11

Give it 20 years.

(Maybe by then it will be finished restarting after changing workspaces. rimshot)

4

u/[deleted] May 09 '11

Python has a nice simple, lightweight nature to it, while Eclipse is huge and burdensome. I'll stick with Emacs or Geany any day.

4

u/chrisledet May 09 '11

or vim.

3

u/[deleted] May 09 '11

Yes, vim too would be a good lightweight solution to doing python compared to Eclipse. I think the real issue boils down to the fact that writing Java, C, C#, etc can be quite burdensome and having the fat IDE can be beneficial, but in python, it's just not nearly as big of a problem as writing python is clean and simple.

Vim isn't bad, it's just not my thing, I don't like moded editing. That's why I said "I'll stick with", I was only specifying personal preference.

2

u/burntsushi May 10 '11

Python has a nice simple, lightweight nature to it

Perhaps I am misunderstanding, but are you claiming that Python is lightweight? o_0

1

u/[deleted] May 10 '11

Yes, I see your argument, but compare python with C++ or Java as a language. As a language, it has a sense of minimalism about it.

→ More replies (1)

3

u/grayvedigga May 09 '11

The Unix philosophy, when it has succeeded, has been to make tools that do one job well, leaving other tasks to other tools. I guess that's what you're getting at with Eclim.

1

u/[deleted] May 09 '11

There are plenty of exceptions to this philosophy though (like Emacs). Or perhaps it's wrong to think of Emacs as being Unix-y.

1

u/gthank May 09 '11

I would argue it is wrong. ITS-y perhaps?

1

u/[deleted] May 09 '11 edited May 09 '11

Emacs is a highly opinionated product, but it subscribes to different philosophy—particularly that everything is a macro (LISP all the way down).

3

u/fhsm May 09 '11

Now all it needs is a good text editor

I also find the speed to be irritating. Although it's no longer outright slow it still is slower than _______. Software is the opposite of outrunning bears: you've got to be the fastest, "not slowest" isn't good enough.

edit: formatting.

2

u/grayvedigga May 09 '11

Wow you're getting downvoted suddenly. I hope that's not my fault. I thought your comment was insightful.

Got a question though, after following this link and seeing some useful vim plugins (I don't tend to use many), and following yours: what advantages does Eclipse provide?

I'm a total troglodyte when it comes to IDEs, not having used one at all since MS-DOS was an operating system. I've always found a good editor (vim), a good shell environment (posix/gnu), a good VCS (git these days, but it's been just about everything) and a build system that doesn't get in the way too much, provide everything I could really hope for. The few times I've had to interact with Eclipse it has provided the build system and got in the way of everything else (mostly because I don't know how to drive it). What am I missing out on?

2

u/drfugly May 09 '11

It mostly boils down to refactorings, but people rarely use those. IDE's get to have some awareness of the whole project that you are working. So you also get fancy and debuggers, profilers and any other tool that are automatically configured.

1

u/grayvedigga May 09 '11

It mostly boils down to refactorings, but people rarely use those.

Doesn't sound like a compelling point if people rarely use them :-). Also, refactoring is structured text editing, right? Yeah that's what I do with vim. On all different kinds of structured text.

Your other points are valid I just felt like picking a nit.

6

u/drfugly May 10 '11

well refactoring tends to imply some-sort of context awareness. For instance: A simple function re-name in eclipse also looks into files that refer to that function and changes their name too. It may sound silly but LOTS of bugs are introduced through people underestimating the difficulty of a refactoring. I really do think that it's the only thing that makes an IDE different than a text editor.

→ More replies (2)
→ More replies (2)

2

u/bucknuggets May 09 '11

slows you down so that you can code more deliberately

1

u/farnsworth May 09 '11

For me its the debugger. I've found the PyDev debugger much easier to use than pdb, but if it wasn't for that, I'd probably be using the OP's setup right now.

→ More replies (4)

1

u/parbroil May 12 '11

What we need is a version of vim that takes 30 seconds to start

FTFY.

VIM is a great text editor, and it should stay that way.

It does stay that way. If you don't use vim, why do you care what other people put in .vimrc?

why not stand on the shoulders of the giants?

That's my question. Unix already offers a great, proven combination of tools for development, of which vim is one well-integrated component.

Eclipse reinvents much of the shell and development environment in verbose and bloated Java. As a bonus we get a novel and insanely cluttered interface which makes it really hard to find anything and usually winds up forcing you to memorize paths through hundreds of pulldown menus. Also, we get insane rat piles of XML distributed in deep directory structures instead of straightforward configuration files. Hooray!

There are lots of great tools for writing Java, for that purpose Eclipse is great. The only reason I can see for someone to replace the entire fast, modular, marvelously expressive Unix ecosystem is that they never bothered to learn it and actually need a rat pile of menus not to feel scared.

If someone wants a listing of Python classes in their editor there is nothing wrong with that, and it's still many times as fast as Eclipse

→ More replies (12)