Phpstorm zen 编码:插入 标签

发布于 2024-11-10 03:57:33 字数 81 浏览 7 评论 0原文

PhpStorm 中是否有内置的 zen 编码快捷方式来插入 标签?如果没有,我该如何设置呢?

Is there a built-in zen coding shortcut in PhpStorm to insert a <?php ?> tag? If not, how would I go about setting one?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

我要还你自由 2024-11-17 03:57:33

不,没有,您可以通过转到文件 -> 来设置它设置-> -- IDE设置-->实时模板 ->添加并使用以下值:-

缩写:php
组:用户
模板文本:
上下文:检查 HTML

No there is not, You can set it by Going to File -> Settings -> -- IDE Settings -- -> Live Templates -> Add And using the following values:-

Abbreviation: php
Group: user
Template Text: <?php $END$ ?>
Context: Check HTML

夏末 2024-11-17 03:57:33

在 PhpStorm2016.1 中必须将 Value 中的 Applicable 更改为 HTML 。

转到文件 ->设置->编辑->代码风格->实时模板
在右侧边栏上单击“+”,然后:
缩写:(例如)p
模板文本:
应用:像以前一样将值更改为 HTMLl
然后点击确定。

输入图像描述这里

In PhpStorm2016.1 must change Applicable in Value to HTML .

Go to File -> Setting -> Editor -> Code Style -> Live Templates
On right sidebar click on "+" then :
Abbreviation : (for example) p
Template text :
Applicatin :change the value to HTMLl like befor
then click on ok .

enter image description here

末が日狂欢 2024-11-17 03:57:33

在较新版本的 PhpStorm(2019.* 或更高版本)中,添加快捷方式略有不同。

首先转到文件->设置(或只需按CTRL + ALT + S)。打开 Editor 选项卡并找到 Live Templates 选项卡。选择 PHP 并单击右侧边栏中的蓝色小加号图标,选择实时模板并:

  1. Abbreviation 输入上键入快捷方式。
  2. 模板文本区域输入
  3. 定义适用的上下文,如 php 和 html。
  4. 如果您想使用另一个键而不是 Tab 展开,则必须定义另一个展开键。

单击应用确定按钮。就是这样。

In newer versions of PhpStorm(2019.* or higher) adding the shortcut is a little bit different.

First go to File -> Settings (or simply press CTRL + ALT + S). Open Editor tab and find Live Templates tab. Select PHP and click small blue plus icon at the right sidebar, select live template and:

  1. Type shortcut on Abbreviation input.
  2. Type <?php $END$ ?> on template text area.
  3. Define applicable context like php and html.
  4. If you want to expand with another key instead tab, you must define another expand key.

Click Apply and OK buttons. That's it.

旧情别恋 2024-11-17 03:57:33

转到

File --> Settings --> Search & click Live Templates

单击右侧的 + 按钮
然后单击“实时模板”,

最后输入以下内容:

Abbreviation: PHP
Template Text: <?php $END$ ?>
Context: Check HTML

单击“应用”,然后单击“确定”

现在输入 php 并在 php 文件中按 Tab 键

 PHP tag (<?PHP ?>) will automatically generated

Go to

File --> Settings --> Search & click Live Templates

Click + button on the right side
then click Live Template

lastly input following:

Abbreviation: PHP
Template Text: <?php $END$ ?>
Context: Check HTML

Click Apply then OK

Now type php and press tab in a php file

 PHP tag (<?PHP ?>) will automatically generated
雅心素梦 2024-11-17 03:57:33

您可以通过文件 -> 来设置它。设置-> -- IDE设置--> Live Templates

然后输入

Abbreviation: php
Group: user
Template Text: php $END$ ?>
Context:
Check HTML

You can set it by going to File -> Settings -> -- IDE Settings -- -> Live Templates

and then input

Abbreviation: php
Group: user
Template Text: php $END$ ?>
Context:
Check HTML
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文