sublime php插件

1. Package Control

Get Package Control here.

 

2. Theme - Phoenix   and  Flatland(扁平)

If Sublime Text 2 is a highly tuned race car, then this plugin is the flashy body work (that also provides down force.) This theme does some minor UI tweaks to the standard Sublime Text layout and lets you configure some things like the tab width. The best feature would be having the folder tree, look, well, like a folder tree. Those little triangles were getting on my nerves!

Just like a file cabinet.

Details on the Phoenix Theme.

3, sublimecodeintel  

sublime默认的代码提示只能提示系统函数,用户自己创建的函数、类不能提示。 如果想要提示自己建立的函数。 可以安装sublimecodeintel插件。

sublimecodeintel 安装后需要配置,文件:插件目录/.codeintel/config 中 增加

  1. "PHP": {
  2.         "php": 'D:SaeServerphpphp.exe',
  3.         "phpExtraPaths": ['D:SaeServerphpstdlib'],
  4.         "phpConfigFile": 'D:SaeServerapachephp.ini'
  5.     },


配置了php执行文件的地址, php的配置文件地址, phpExtraPaths 是额外需要代码提示的类库,除了当前项目下的PHP代码可以提示外 phpExtraPaths中定义的目录下的PHP代码也能提示。  D:SaeServerphpstdlib 是SaeServer中 SAE本地模拟文件的目录, 所以配置后不管在哪儿 都能有SAE代码的提示。

  安装sublimecodeintel后, 按alt+鼠标左键也能和ctags一样跳转到函数声明的地方。 但是如果有两个文件声明了同样名称的函数, sublimecodeintel只会跳转到第一个找到的函数, 而ctags会让你选择要跳转到哪个文件。所以我们一般还是用ctags的跳转功能。

4,sublimelint 和Phpcs 

sublimeint 需要系统有php命令。 所以需要设置好php的环境变量。 sublimelint的语法错误提示是显示在状态栏上面的,所以在编写程序的时候注意时常看看状态栏。 而Phpcs的语法错误提示是在我们保存文件时弹出万能面板显示错误,sublimelint的错误提示实时但不明显。 Phpcs的错误提示不是实时的,但很明显。 因此我们一般这两个插件都要安装。  

Sublime Linter

Phpcs除了代码提示的共,还有其他功能,但是我暂时没有弄明白其他功能怎么用, 大家可以去研究一下,如果知道怎么用了再告诉我一下。

PHP CodeSniffer

5,goto document。 

这个插件能帮助我们快速查看手册。 比如我们在写php代码时, 突然忘记了某个函数怎么用了,将鼠标放在这个函数上,然后按F1,它能快速打开PHP手册中说明这个函数用法的地方。 
    安装好 goto document插件后我们再配置快捷键F1 跳转到文档。 打开sublime的菜单栏Preferences->key bindings -User  设置快捷键:

  1. [
  2.     { "keys": ["f1"], "command": "goto_documentation" }
  3. ]

这样设置后, 按F1就能跳转到文档了。

6,function name display。 

这个插件可以在状态栏显示出当前光标处于哪个函数中。

7 gist。我们建立html文件时,做有些相同的代码。 这时候我们喜欢能有一个代码模板, 不能写重复相同的代码, gits插件能实现代码模板的功能。 它能见我们自己创建的代码模板,代码片段保持在github中的gist下。http://lucifr.com/2012/03/07/sub ... al-snippet-manager/ 这里介绍了详细的用法。

I want to make a Gist out of this function and the preceding bracket!

8,additional PHP snippet 和 DocBlockr  代码注释格式化。

additional PHP snippet插件能提示phpdocument格式的代码,还能快速输出开源协议, 输入php- 会有提示
安装DocBlockr 插件,能形成注释块。不用每次敲注释的斜杠或星号。

Not the best naming of things here…

9 Brack­etHigh­lighter

成对匹配的增强。 像这些符号是成对的:花括号{}, 中括号[],括号:() ,引号“” 等。 这些符号当我们鼠标放在开始符号的位置的时候, 希望能明显看到结尾符号在哪儿sublime默认是下划线,很不明显, 想要明显一点,

Ter­mi­nal

Xde­bug Client

PHP Namespace Command

原文地址:https://www.cnblogs.com/zhepama/p/3930596.html