Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

315
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!