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

316
Vistas
Vue.js - when creating new Vue File pass automatically name attribute

I am searching for a way when creating new Vue.js files to pass automatically the name attribute.

For example, when I create a new Vue file with name Test.vue, to generate this automatically:

<template></template>

<script>
export default {
    name: 'Test',
};
</script>

<style></style>

To add the name attribute based on the file name creation. Is there any automated way in order to stop adding this manually every time I create Vue file?

Thanks!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I would suggest you take a look at this: Custom snippets in VS Code. I do not know a way how to invoke a script on creation of a file, but you could choose a keybinding like "default" which would create a snippet as you wish.

To my knowledge, it would even be possible to set where the cursor will end up, so that you would still have to type the filename manually, but it would immensely speed up your workflow.

You may find more information on this StackOverflow post, or take a look at the VS Code documentation to this topic

about 4 years ago · Juan Pablo Isaza 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