简体   繁体   English

PhpStorm - HTML 5样板代码片段

[英]PhpStorm - HTML 5 boilerplate code snippet

I am an avid user of Visual Studio Code and before that Sublime Text. 我是Visual Studio Code的狂热用户,之前是Sublime Text。 I have recently started using PhpStorm for my Laravel projects and I am really missing the ability to instantly produce a simple HTML 5 boilerplate template by simply typing html + TAB . 我最近开始在我的Laravel项目中使用PhpStorm,我真的很想通过简单地键入html + TAB来立即生成一个简单的HTML 5样板模板。

Is there anything similar in PhpStorm? PhpStorm中有类似的东西吗?

Is there anything similar in PhpStorm? PhpStorm中有类似的东西吗?

! + Tab IIRC. + Tab IIRC。

In IDEA-based IDEs it's called Live Templates . 在基于IDEA的IDE中,它被称为实时模板 IDE also supports Emmet . IDE还支持Emmet

All Live Templates can be found at Settings/Preferences | Editor | Live Templates 所有实时模板都可以在Settings/Preferences | Editor | Live Templates Settings/Preferences | Editor | Live Templates Settings/Preferences | Editor | Live Templates -- you can modify exiting or add your own (I suggest using own groups for own templates -- less possible hassle with updates and sharing). Settings/Preferences | Editor | Live Templates - 您可以修改退出或添加自己的模板(我建议使用自己的组来创建自己的模板 - 更少和更新共享的麻烦)。

Snippets for HTML (plus standard Emmet abbreviations) are located under Zen HTML node. HTML的片段(加上标准的Emmet缩写)位于Zen HTML节点下。

You can also customise the expand key: 您还可以自定义扩展键:

  • by default it's offered among usual Tab , Space and Enter .. but you can also configure your own shortcut. 默认情况下,它在常用的TabSpaceEnter中提供 ..但您也可以配置自己的快捷方式。
  • each Live Template can be set to use different expand key (among those mentioned above) .. although I do not really see any real benefit for this. 每个实时模板可以设置为使用不同的扩展键(在上面提到的那些)..虽然我真的没有看到任何真正的好处。

You can also use File Templates ( [ 1 ] and [ 2 ] ) to make files with some predefined content/structure. 您还可以使用文件模板[1][2] )来制作具有某些预定义内容/结构的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM