Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

645
Vistas
VS Code php tag autocomplete

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>

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?

about 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

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"
}
about 4 years ago · Santiago Trujillo Denunciar

0

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": ["<?php", "$0", "?>"],
    "description": "php tag"
  }
}
about 4 years ago · Santiago Trujillo Denunciar

0

In Visual Studio Code, go to File > Preferences > User Snippets > html.json file and then paste the following code:

"php": {
    "prefix": "php",
    "body": [
        "<?php $1 ; ?>",
        "$2"
    ],
    "description": "php tag"
}
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda