如何使用 Vim 和 Eclipse 提高 PHP5.3 项目的工作效率(可能使用 Eclim 与 Zend Studio 集成)
在开发应用程序时,我总是努力提高生产力,在过去的几年里,我可以说我在提高生产力方面取得了良好的进展,但我仍然发现我需要更多的工具或方法。我需要更快地编辑并学习盲打(目前正在过程中),因此我发现需要转向 Vim。现在已经一年多了,我已经放弃了 Windows 并转移到 Linux(更准确地说是 Ubuntu),并且我正在使用 IDE Zend Studio 与 Aptana Studio 结合用于开发 OO PHP5.3 网站。尽管 IDE 可以完成我需要 IDE 所需的所有功能(我将很快列举),但它缺少 Vim 提供的编辑模式。
所以我的问题是:我如何在 Vim 的 IDE 中拥有所有相同的以下“杀手级功能”?
以下是我保持高水平工作效率所需的功能的详细列表:
PHP5.3 的代码完成,不仅仅是 PHP5,不仅仅是 PHP 函数,还有添加到构建路径的任何库,例如 Zend Framework 和我自己的库。
代码格式化,除了 XML 文件之外,我不太使用它,但这是我很快就需要的东西,因为我将开始领导公司内的更多人,格式化程序将有助于保持代码的一致性。
我在 Zend Studio (eclipse) 中使用 Oxygen XML 编辑器 来编辑 Docbook XML 技术文档。它已经证明了我的卓越品质,我想保留它。
可在 Web 上使用的任何文件扩展名的语法验证,对我来说主要是 PHP5.3 语法、html 语法(不是那么重要)、CSS、Javascript(这就是我将 Aptana Studio 与 Zend Studio 集成的原因,他们的 javascript 编辑器非常好,支持 JQuery)
也许 git 集成就像 EGit(eclipse 插件)?不是必需的,但是一个不错的插件。
调试功能(已经通过 ZendDebugger 使用它)
在文件中强大的搜索
我知道这很多,但是我已经在我的 IDE 中拥有了所有这些,正如我所说,我觉得有必要转向像 Vim 这样基于模式的编辑器,以便在打字时更加高效,而且我觉得学习曲线和投入在设置所有这些方面的时间都会很好值得付出努力。
我知道有 Eclim,它将 eclipse 集成到其守护进程中,我正在考虑使用它,如果有人有的话对于与 Zend Studio 一起使用的 Eclim 的反馈,我们将不胜感激。
与 Eclim 一起,如果我需要更多 vim 插件来满足我的需求,如果有人能指导我使用它们,我将非常感激。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,在尝试了很多可以使用 vim 提高工作效率的工具之后,我做出了选择。
我首先使用 MiniBuffer 安装 GVim,NERDTree, Bufkill, Matchit, PDV (phpDocumentator), < a href="http://www.vim.org/scripts/script.php?script_id=273" rel="nofollow noreferrer">taglist 插件和其他插件,以确保我会像我一样舒服需要替换 Eclipse 中已有的功能。我还安装了 Eclim,这是一个与 eclipse 集成的非常好的插件,当安装在Zend Studio 7.1(尽管有一个小Zend Studio 完成辅助中的错误,限制了其在 Eclim 上的使用)。我还关注了这三个博客 (O'Phinney's , 托马斯·科赫的 和 Schlitt 的,以确保我处于最高的生产力)。在尝试了所有这些之后,我仍然觉得自己对 GVim 编辑还很不适应。
由于我已经对触摸打字和 Vim 背后的强大功能深信不疑,所以我绝对不会再使用像 Eclipse 提供的那样的裸编辑器。因此我尝试了 viPlugin、Vrapper 和 vimPlugin,这不是我所期望的他们。 viPlugin和Vrapper将vi模拟到Eclipse中,而vimPlugin只是将Vim集成为外部编辑器(渲染代码完成、重构等无法使用),还不够成熟。视觉块不起作用,当您开始真正使用它们时,一些漂亮的错误会出现在您的路上。我并不是在抨击这些插件,因为它们仍然相当不错,但这并不是我所期望的。
然后我偶然发现了 Netbeans 及其于 2009 年 12 月发布的新版本 6.8,现在完全支持 PHP5.3 、 PHPUnit、代码覆盖率报告、重构、XDebug 集成、代码完成。当我看到 jvi 插件将 vi 模拟到 netbeans 时(是的,视觉块作品!!)。这个插件真是太棒了,而且工作得非常好。
正如我的问题中所问,唯一遗漏的是 Oxygen XML 编辑器,它是 未集成在netbeans插件中,但我仍然可以使用他们的本机编辑器,所以它甚至没有对我来说是个问题。对于 Git 集成,有一个用于 netbeans 的插件,但我坚持使用 git gui。
如果你们像我一样想要两全其美,那么你们绝对应该查看用于 PHP5.3 开发的 netbeans 新版本,同时将 Vim 作为主要编辑器。
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.
我也有兴趣将 Eclim 与 Zend Studio 一起使用。但是,我已经有一个 Zend Studio 项目,并且安装 Eclim 需要创建一个“eclim 项目”。根据 eclim 安装说明,该过程将在项目的根目录中创建一个 .project 文件。这意味着它可能会覆盖 ZendStudio .project 文件...这会损坏我的项目文件...如果我认为 eclim 不适合我,我不想这样做。
让我知道它对你来说效果如何。
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.