Man8Blue
Man8Blue

Reputation: 1197

Using VIM for Python IDE in Windows?

I am turning to Python from .NET world. And Visual Studio was something a great tool i used.

In python world we do have basic IDLE and another one is VIM. I have seen that a lot of developers have configured VIM to a great IDE. Using basic VIM in Windows 7 seems of less use. So i want to moderate my VIM to a level which has file explorer, syntax highlighting, search, error highlighting etc. So that it gives feel of Visual Studio and more productive.

But all hacks/tips available are for Linux/Ubuntu users mostly, which i may use later but as of now i need to make my VIM in Windows more productive, visual.

Please Suggest some Tips/Hacks/Resources to look around for VIM configuration?

Thanks

Upvotes: 1

Views: 4255

Answers (5)

sanjivchristopher
sanjivchristopher

Reputation: 74

One possible compromise is to use your favorite IDE with a vim emulator plugin. For example, in Eclipse you can use Vrapper, PyCharm has IdeaVim and so forth. Lighttable also has vim key-bindings. The plug-ins (or key-binding options) give you some of the benefits of editing in Vim while still having the powerful debugging / navigation features, etc. of a full-blown IDE. BTW, Vrapper works with PyDev. Using an emulator in an IDE allows you to gain the "muscle-memory" necessary for effective vim editing, without getting bogged down in "configuration hell" associated with turning an editor into an IDE (which auto-complete plugin do I use?..etc.?). Once you have mastered the vim keystrokes for normal and visual mode, used along with insert mode, you may decide to continue on into pure Vim and face those issues.

Upvotes: 0

Hari Palappetty
Hari Palappetty

Reputation: 549

I am in no way an evangelist of any Editor/IDE.

But, if you are a newbie to Python I would suggest trying out Sublime Text 2 http://www.sublimetext.com/ . It is a very light weight yet powerful editor with a great following and it has a free evaluation version with no deadline.

But, if you intend to work using frameworks such as Django/ GAE then I would suggest using PyCharm from JetBrains http://www.jetbrains.com/pycharm/

Finally, these tools are all just personal choices until you get comfortable with one or two of them.

Thanks, -Hari

Upvotes: 0

romainl
romainl

Reputation: 196516

This question addresses your low level issue: coding Python with an IDE that is not VS.

There are a few popular blog posts addressing your high level issue: setting up Vim for Python development. They are a quick google away…

I feel the need to point out that Vim is not an IDE. You can customize it a lot and end up with something that looks like an IDE but you won't get an IDE. Only an over-customized text editor.

Anyway, here are a few tips for starting out with Vim:

  • Do $ vimtutor as many times as needed to feel comfortable with the basics.

  • Get familiar with Vim's buit-in documentation: the answers to most of your questions are somewhere inside. :help gets you to the front page, :help 'option' shows the documentation for option, :help :command shows the documentation for command… Hit <C-]> on a colored word to jump to its definition.

  • Don't use Janus or SPF13 or whatever pre-packaged set of plugins. You'll only grow bad habits. Similarly, don't copy other people's vimrc wholesale.

  • Ctags is an external code indexer that is used by Vim to "jump to definition" with <C-]>. cscope is another option, it's more powerful but also a little more complex. See :help tags.

  • Related to ctags, TagList and TagBar are two popular plugins used to display more or less the equivalent of the Object Browser in VS.

  • NERDTree is another popular plugin that mimicks the file tree found in many IDEs/editors. But Vim comes with netrw (:Ex) by default, try it before installing NERDTree.

  • Read :help motion.txt as soon as possible.

  • Watch Drew Neil's laser-guided vimcasts.

  • Don't rush it.

Upvotes: 11

Aaron Digulla
Aaron Digulla

Reputation: 328556

I wouldn't recommend to learn VIM in 2012 (despite it being a great editor). If you must, this blog post will get you started.

But VIM isn't an IDE, it's a text editor.

If you really want a powerful IDE, try IntelliJ IDEA or Eclipse. Both have great plugins to turn them into Python IDEs (along with code completion and all the other nice time savers). For Eclipse, try PyDev. For IntelliJ, search for Python in the plugin preferences pages.

Upvotes: -1

dm03514
dm03514

Reputation: 55952

you can use vim plugins on windows, http://www.vim.org/scripts/index.php, typing "vim {your feature here}" into google will come up with lots of results.

popular file explorer is nerdtree,

syntax highlighting can be turned on with

syntax on in your vimrc

searching open file is easy to do using reg exes . Initialize search with /.

Searching directory is easy to do using grep.

I don't develop on windows but i have read that Cygwin might be worth installing for some linux tools if not already installed.

Upvotes: 1

Related Questions