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 标签
which is useless and i have no idea why it's there. I want it to do normal php tag
我已关闭建议,因为它们会分散我的注意力.无论如何编辑默认/顶部标签自动完成"项目?
I have turned off suggestions as they were distracting me. Anyway to edit default/top "tab autocomplete" item?
推荐答案
这个 hack 对我有用:转到首选项:打开用户代码段",然后将此代码段粘贴到 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屋!