christianbauer1
christianbauer1

Reputation: 536

VS Code Vue <template> <script> <style> autosuggestion

It's been a time since I have been programming with Vue. But when I started entering something like vuedef in a newly created .vue file it auto-suggested me the following instead of writing it all on my own:

<template>
</template>

<script>
</script>

<style>
</style>

I can't remember how I did that but I guess it was a certain word I had to type.
Maybe it comes from an VS-Code Addon?

Upvotes: 1

Views: 7395

Answers (2)

Achintha Shashika
Achintha Shashika

Reputation: 1

In vue js you can use this 'vuedef' command for auto generate

Upvotes: 0

kissu
kissu

Reputation: 46732

vuedef comes with Vetur: https://marketplace.visualstudio.com/items?itemName=octref.vetur

For any modern Vue3 apps, you can use Volar (it's officially the one to use now too): https://marketplace.visualstudio.com/items?itemName=Vue.volar

Those 2 are also quite nice:

You should have plenty of choice after that!


You can also create your own snippets of course directly into VScode: https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets

Upvotes: 5

Related Questions