Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

317
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda