Eclipse的PHP IDE - 自定义自动完成标签 [英] Eclipse PHP IDE - custom auto complete tags
问题描述
新来的Eclipse IDE,并想知道是有增加一个自动完成/改变的一种方式,这样,如果I型:
New to Eclipse IDE and was wondering is there is a way of adding an auto complete/change so that if I type:
mres
将它翻译成
mysql_real_escape_string()
我知道正常的PHP code完成,但无法看到有关使自定义快捷键什么。
I know of the normal PHP code completion, but couldn't see anything about making custom shortcuts.
谢谢,
Niggles
Thanks, Niggles
推荐答案
,创建你自己的PHP模板。从菜单Window> preferences,选择PHP>编辑>模板。单击新建按钮,然后用 MRES
作为模板名称,然后把
If you using PDT, create your own PHP Template. From the menu Window > Preferences, choose PHP > Editor > Templates. Click New button, then use mres
as the template name, then put
mysql_real_escape_string(${cursor})
作为图案。
要使用它,只需键入MRES和preSS Ctrl +空格键。如果有对 MRES
没有其他选择,那么你的模板将马上使用。如果你碰巧有2或多个模板与 MRES启动
或包含模板名称 MRES
,弹出框将要显示这样你就可以选择你要使用的。
To use it, just type mres and press Ctrl+Space. If there are no other alternative for the mres
, then your template will be used right away. If you happened to have 2 or more templates that started with mres
or contain mres
in the template name, a popup will be showed so you can choose which you want to use.
这篇关于Eclipse的PHP IDE - 自定义自动完成标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!