Home VSCode Snippets
Post
Cancel

VSCode Snippets

Create & Config

  1. ctrl+shift+p
  2. type snippet
  3. select for global or for current workspace
  4. create snippet
  5. example for yaml frontmater
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    
     {
         "front-matter": {
             "prefix": "fmt",
             "body": [
                 "---",
                 "title: ${1:Title}",
                 "author: ${2:rendrapcx}",
                 "date: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND +0700",
                 "categories: [${3:Cheatsheet}]",
                 "tags: [${4:bash}]",
                 "pin: ${5|false,true|}",
                 "---",
                 "## $0"
             ],
             "description": "front-matter"
         }
     }
    
  6. create new file.md, type fmt
  7. press Ctrl + Space if popup doesnt show
  8. press tab or enter

Useful Tools

Snippets Generator

Vscode Extension

This post is licensed under CC BY 4.0 by the author.