How can I save my own html boilerplate for future use shortcut?

112 Views Asked by At

I know we have this '!' shortcut so as to automatically fill in a standard html boilerplate.

But I want to add one line to it() and save this form for future use - how to do that?

1

There are 1 best solutions below

1
Anaswara On

Try this: open your vs code

  1. go to view->command palette or (ctr + shift + P)

  2. type and enter Snippets:Configure User Snippets

  3. select and enter ' html.json '

  4. copy and paste below code

    "boilerplatecode": {

            "prefix": "boilerplatecode",
    
            "body": [
            "<html>",
    
    "<head>",
    
    "</head>",
    "<body>",
    
    "</body>",
    "</html>"
    
            ],
    
            "description": "Log output to console"
        }
    }
    
  5. Edit code inside the squre bracket and save it

  6. create a html page and type shortcut key boilerplatecode and enter then the code automatically come in your editor.