How to increase productivity with Vim and Eclipse for PHP5.3 projects (possibly using Eclim integration with Zend Studio)
Asked Answered
C

2

3

I always strive to increase my productivity when developing applications and in the span of the last few years, I can say that I have made good steps towards increasing that productivity, but I still find I need more tools or methods. I need to edit faster and learn touch typing (currently in the process) and therefore I find a need to move to Vim. It has been now over one year I have trashed Windows and moved to Linux (Ubuntu to be more precise) and I am using the IDE Zend Studio combined with Aptana Studio for developing OO PHP5.3 websites. Although the IDE does everything I would need from an IDE (which I will enumerate shortly), it lacks the editing mode Vim would give.

So my question is: how would I have all the same following 'killer features' I already have within this IDE in Vim?

Here is the extensive list of features I need to keep the productivity at an high level for me:

  • Code completion for PHP5.3, not just PHP5 and not just the PHP functions, but any libraries that are added to the buildpath, such as Zend Framework and my own library.

  • Code formatting, I don't use it much, except for XML files, but that is something I would need soon as I will start to lead more people within my company and formatters will help to keep the code coherence.

  • I use Oxygen XML editor within Zend Studio (eclipse) for editing Docbook XML technical documentation. It has already proven of great quality to me and I would like to keep it.

  • Syntax validation for any file extensions that can be used on the Web, mostly for me would be PHP5.3 syntax, html syntax (not that important), CSS, Javascript (that's why I have Aptana Studio integrated with Zend Studio, their javascript editor is great with JQuery support)

  • Maybe a git integration just like EGit (eclipse plugin)? Not required but a nice addon.

  • Debugging features (already using it through the ZendDebugger)

  • Powerful searching within files

I know that is a lot, but I am already having all this within my IDE and as I said, I feel the need to move to mode based editors like Vim to be more productive when typing and I feel the learning curve and time invested in setting up all of this will be well worth the effort.

I know that there is Eclim, which integrates eclipse to its daemon and I am thinking of using just that, if anyone has feedback on Eclim used with Zend Studio that would be appreciated.

Along with Eclim, if I need more vim plugins to achieve my needs, I would gladly appreciate it if someone could direct me to them.

Conni answered 16/2, 2010 at 20:19 Comment(0)
C
3

Aright, after playing around much with the tools that would increase productivity using vim I have made my choice.

I first installed GVim with the MiniBuffer, NERDTree, Bufkill, Matchit, PDV (phpDocumentator), taglist plugins and others to make sure I would be as much comfortable as I would need for replacing the functionnalities I already had within Eclipse. I also installed Eclim, which is a pretty good plugin to integrate with eclipse and it works great with completion assist when installed on Zend Studio 7.1 (although there is a minor bug within Zend Studio's completion assist that restricts its use on Eclim). I also followed those three blogs (O'Phinney's, Thomas Koch's and Schlitt's to make sure I was at the top of productivity). After trying my hands on all of that I still felt I was far from comfortable for some GVim editing.

Since I am already sold on the powers behind touch typing and Vim, there was absolutely no way I would return on bare editors such as the one Eclipse provide. Therefore I tried, viPlugin, Vrapper and vimPlugin, which were not what I expected from them. The viPlugin and Vrapper, which emulates vi into Eclipse, as opposed to vimPlugin who just integrates Vim as an external editor (rendering code completion, refactoring and such unusable), are not enough mature yet. Visual block is not working and some nifty bug gets on your way when you start to really use them. I am not bashing those plugins since they are still pretty good, but it was just not what I expected.

Then I just stumbled on Netbeans and their new version 6.8 released on December 2009, which now have fully support on PHP5.3, PHPUnit, Code coverage reports, refactoring, XDebug integration, Code completion. What made the grand finale is when I saw the jvi plugin which emulates vi into netbeans (and yes, visual block works!!). That plugin is just absolutely amazing and works very very well.

The only thing that was left out, as asked in my question, was the Oxygen XML Editor which is not integrated in a netbeans plugin, but I can still use their native editor so it was not even an issue for me. For Git integration, there is a plugin out there for netbeans, but I sticked with git gui.

If you guys out there want the best of both worlds just like I wanted, you should definitely checkout the new release for netbeans for PHP5.3 development, while keeping Vim as your main editor.

Conni answered 23/2, 2010 at 1:31 Comment(1)
As a side note, eclipse now has the viable plugin, which is working really good. It is basically the same as jvi, although with less features, but bundled up with everything one would need to be productive. It is not free, but it was the only vim plugin that was worth my money for eclipse. Jvi still stands better, and it is free, but having vim support for both Eclipse and Netbeans was something I was looking for.Conni
H
0

I'm interested in using Eclim with Zend Studio as well. However, I already have a Zend Studio Project and installing Eclim requires the creation of an "eclim project". That process, according to the eclim installation notes, will create a .project file in the root directory of the project. And that means it will likely overwrite the ZendStudio .project file...which will corrupt my project files... something I don't want to do in case I decide that eclim is not for me.

Let me know how it works out for you.

Hodgepodge answered 16/2, 2010 at 22:26 Comment(2)
Yeah I am using already set-up projects as well and won't be creating ones with Eclim since projects will get created using Zend_Tool. When I get time to figure all that out I will let you know how I did it, if I am able to achieve all my development quality and requirement attributes on vim.Conni
@trelayne You don't have to necessarily add projects using Eclim if you already have created them. As long as they were added in your workbench, Eclim will be able to see them. I have never actually created projects with Eclim. Inside vim you can type :ProjectInfo to see if the current file is in an Eclipse project.Conni

© 2022 - 2024 — McMap. All rights reserved.