php 开发理想的 vim 配置是什么?
我在 PHP 中使用 VIM 编辑器,我知道很多人会指出 PDT,但不知怎的,我喜欢继续使用 VIM,那么
您对 PHP 开发的理想 VIM 配置有何建议?
I use VIM editor for PHP, i know many people will point to PDT but somehow I like to stay with VIM and so
What are your suggestions for ideal VIM configuration for PHP Development ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您可能想要使用 PHP 语法文件,例如: http://www .vim.org/scripts/script.php?script_id=1571
FWIW:就我个人而言,我目前很喜欢学习 vim,但仍然更喜欢使用 netbeans 进行 PHP 开发,因为它有很多我需要的功能,例如自动 scp远程服务器和使用 XDebug 进行远程调试。
You would probably want to use a PHP syntax file such as: http://www.vim.org/scripts/script.php?script_id=1571
FWIW: Personally I am enjoying learning vim at the moment but still prefer netbeans for PHP development because it has many features that I need, such as automatic scp to a remote server and remote debugging with XDebug.
如果您使用过 PDT 并且喜欢它,您可能需要了解一下 Eclim。它允许您使用 vim,但可以挂钩 eclipse 进行项目、代码完成等。这使得跳转到 PDT 进行调试,然后返回 vim 进行编码变得更容易一些。
If you've used PDT and like it, you might want to look into Eclim. It allows you to use vim, but hooks into eclipse for projects, code completion, etc. This makes it a little easier to jump into PDT for debugging, then back to vim for coding.
你真的应该使用 Tobias Schlitt 的 VIP,这是“PHP 的 VIM 集成,包括 VIM (PDV) 脚本的 phpDocumentor。主要组件是一个 VIM 文件类型插件,它配置了很多 VIM 增强功能,以便在 PHP 中更舒适地编辑 PHP维姆”。
在它的名称从 PDV 更改为 VIP 之前我就一直在使用它,它真的很棒。
你可以从 github 上获取它 http://github.com/tobyS/vip
you really should be using Tobias Schlitt's VIP, which is "VIM integration for PHP, including the phpDocumentor for VIM (PDV) script. The main component is a VIM file type plugin, which configures a lot of VIM enhancements for more comfortable PHP editing in VIM.".
I've been using it since before its name changed from PDV to VIP and it really is superb.
You can get it off github at http://github.com/tobyS/vip
它确实根据您的风格而有所不同,但一个好的起点是创建一个名为
~/.vim/after/ftplugin/php.vim
的文件。如果您发现任何对 PHP 有用的映射,请将它们放入此文件中(使用映射的
选项来阻止它们泄漏到其他类型的文件中)。一旦您知道您喜欢tabstop
、autoindent
、smartindent
等的值,请使用:setlocal 将它们放入 ftplugin 文件中
。It really varies depending on your style, but a good place to start is to create a file called
~/.vim/after/ftplugin/php.vim
. If you find any useful mappings for PHP, put them into this file (use the<buffer>
option for mappings to stop them leaking into other types of files). Once you know what sort of values you like fortabstop
,autoindent
,smartindent
etc, put them into the ftplugin file using:setlocal
.我喜欢这个,自动为你折叠你的代码..
http://www .vim.org/scripts/script.php?script_id=1623
一般情况下在 Vim 中折叠...
并且要了解 php 精神,请使用 phpx 颜色方案.. :)
查看该项目的总体情况,了解一些不错的配色方案。
I like this, to automatically fold your code for you..
http://www.vim.org/scripts/script.php?script_id=1623
Folding in Vim in general...
and to get into the php spirit, use the phpx colorscheme.. : )
Check out that project in general, for some nice colorschemes.
配置文件和使用技巧怎么样? 适用于 PHP 程序员的 Vim
What abou config files and usage tips? Vim for PHP programmers