从Eclipse PDT转换为Vim

时间:2023-01-17 19:30:55

I truly love VIM - it's one of only a handful of applications I've every come across that make you feel warm and fuzzy inside. However, for PHP development, I still use PDT Eclipse although I would love to switch.

我真的很喜欢VIM--它是我遇到过的少数应用程序之一,让你感到温暖和模糊。但是,对于PHP开发,我仍然使用PDT Eclipse,尽管我很乐意切换。

The reason I can't quite at the moment is the CTRL+SPACE code-assist functionality that I rely on so much - it's so useful, especially when type hinting, or using PHPDoc variable comment blocks.

我现在不能完全理解的原因是CTRL + SPACE代码辅助功能,我非常依赖它 - 它非常有用,特别是在类型提示或使用PHPDoc变量注释块时。

I know there are cool plugins for VIM out there that can probably replicate this functionality and then some - but what are they?

我知道有很酷的VIM插件可以复制这个功能,然后一些 - 但它们是什么?

3 个解决方案

#1


7  

Vim has OmniCompletion built in, you should add this to your .vimrc:

Vim内置了OmniCompletion,你应该将它添加到你的.vimrc中:

filetype plugin on
au FileType php set omnifunc=phpcomplete#CompletePHP

In addition I recommend you this plugins:

另外我推荐你这个插件:

and also take a look to this article about php debugging in Vim, and this paper, it has many useful tips for using Vim in PHP Development.

并且还看一下这篇关于Vim中php调试的文章,本文提供了许多在PHP开发中使用Vim的有用技巧。

#2


0  

Code assist it's a new feature of VIM 7 [Ctrl+x] [Ctrl+o] will auto complete your code or open a popup of options

代码辅助它是VIM 7的新功能[Ctrl + x] [Ctrl + o]将自动完成代码或打开弹出的选项

More features of VIM 7 can be found in this blogpost

VIM 7的更多功能可以在这篇博文中找到

Btw, I too like vim, but the PDT (and other IDEs) has much more features than code assist that make me preffer them over it.

顺便说一下,我也喜欢vim,但是PDT(以及其他IDE)拥有的功能远远多于代码辅助功能,这些功能让我可以为它们做好准备。

#3


0  

Look at SuperTab for making tab-autocompletion in Vim a bit easier to use than the standard bindings. You may also want to look into ctags, if you're into code indexing. Google "php vim ctags" and you'll see plenty of articles describing how to set it up.

看看SuperTab使Vim中的tab-autocompletion比标准绑定更容易使用。如果您正在进行代码索引,您可能还需要查看ctags。谷歌“php vim ctags”,你会看到很多文章描述如何设置它。

The official Vim Wiki has a PHP section with some good tips, like integrating the official PHP documentation.

官方的Vim Wiki有一个PHP部分,其中包含一些很好的技巧,比如集成官方的PHP文档。

#1


7  

Vim has OmniCompletion built in, you should add this to your .vimrc:

Vim内置了OmniCompletion,你应该将它添加到你的.vimrc中:

filetype plugin on
au FileType php set omnifunc=phpcomplete#CompletePHP

In addition I recommend you this plugins:

另外我推荐你这个插件:

and also take a look to this article about php debugging in Vim, and this paper, it has many useful tips for using Vim in PHP Development.

并且还看一下这篇关于Vim中php调试的文章,本文提供了许多在PHP开发中使用Vim的有用技巧。

#2


0  

Code assist it's a new feature of VIM 7 [Ctrl+x] [Ctrl+o] will auto complete your code or open a popup of options

代码辅助它是VIM 7的新功能[Ctrl + x] [Ctrl + o]将自动完成代码或打开弹出的选项

More features of VIM 7 can be found in this blogpost

VIM 7的更多功能可以在这篇博文中找到

Btw, I too like vim, but the PDT (and other IDEs) has much more features than code assist that make me preffer them over it.

顺便说一下,我也喜欢vim,但是PDT(以及其他IDE)拥有的功能远远多于代码辅助功能,这些功能让我可以为它们做好准备。

#3


0  

Look at SuperTab for making tab-autocompletion in Vim a bit easier to use than the standard bindings. You may also want to look into ctags, if you're into code indexing. Google "php vim ctags" and you'll see plenty of articles describing how to set it up.

看看SuperTab使Vim中的tab-autocompletion比标准绑定更容易使用。如果您正在进行代码索引,您可能还需要查看ctags。谷歌“php vim ctags”,你会看到很多文章描述如何设置它。

The official Vim Wiki has a PHP section with some good tips, like integrating the official PHP documentation.

官方的Vim Wiki有一个PHP部分,其中包含一些很好的技巧,比如集成官方的PHP文档。