VS Code php标签自动完成 [英] VS Code php tag autocomplete
问题描述
些琐碎的问题,但事情就到此为止.我不知道为什么VS Code自动正确完成(带有选项卡)所有html标记,而php标记不正确.当我输入"php"并点击选项卡时,它将创建以下内容:
kind of trivial question but here it goes. I can't figure out why VS Code autocompletes (with tab) all html tags correctly while php tag not. When i type "php" and hit tab, it creates this:
<php></php>
这是没有用的,我不知道为什么它在那里.我希望它做普通的php标记
which is useless and i have no idea why it's there. I want it to do normal php tag
<?php ?>
由于建议分散了我的注意力,我已将其关闭.还是要编辑默认/顶部的标签自动完成"项目?
I have turned off suggestions as they were distracting me. Anyway to edit default/top "tab autocomplete" item?
推荐答案
此技巧对我有用:转到首选项:打开用户代码段",然后将此代码段粘贴到html
(是html)用户代码段中:
this hack worked for me: go to 'Preferences: Open User Snippets', and paste this snippet into the html
(yes, that's html) user snippets:
"php": {
"prefix": "php",
"body": [
"<?php $1 ?>"
],
"description": "php tag"
}
这篇关于VS Code php标签自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!