VS Code php tag autocomplete

后端 未结 7 2287
刺人心
刺人心 2020-12-23 11:47

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 t

7条回答
  •  余生分开走
    2020-12-23 12:03

    I would elaborate on Lane's answer by putting the final cursor represented by $0 in a new line between the tags. In the snippet, each comma inside the "body" array represents a new line.

    So in Visual Sutiio Code go to File > Preferences > User Snippets search for "html.json" and edit it by pasting this:

    {
      // Place your snippets for html here. 
      "php": {
        "prefix": "php",
        "body": [""],
        "description": "php tag"
      }
    }
    

提交回复
热议问题