VSCODE 사용자 정의 코드 조각

설정 방법

  1. Ctrl + Shift + p
  2. Configure Snippets 검색
  3. 어느 파일에 적용할지 선택 (markdown, astro, jsx 등등)

코드 조각 예시

astro markdown frontmetter 설정 예시

{
	"Astro Frontmatter": {
		"prefix": "---",
		"body": [
			"---",
			"title: '$1'",
			"description: '$2'",
			"pubDate: '$3'",
			"---"
		],
		"description": "Insert Astro frontmatter block"
	}
}

자동입력 코드 조각 예시

"Astro Frontmatter": {
    "prefix": "---",
    "body": [
        "---",
        "title: '${1:제목}'",
        "description: '${2:설명}'",
        "pubDate: '${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}'",
        "updatedDate: '${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}'",
        "---",
        "$0"
    ],
    "description": "Insert Astro frontmatter block with today's date"
}