- ctrl + p 를 누르고
>
를 입력하여 command Select로 만든다.
- snip 을 입력하여
Preferences: Configure User Snippets
를 찾아 enter
- 다시 검색창이 뜨면 java 를 입력하여
javascript.json
를 찾아 enter
- 원하는 자동완성 시키고 싶은 코드 작성 후 저장
{
// Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Express Callback": { // 사용자 임의로 이름 지정
"prefix": "exp", // 사용할 명령어
"body": [
"(req, res, next) => {$1}",
"$2"
],
"description": "Express Callback"
}
}
// $1 은 처음 tab 했을 때 (완성되었을 때) 커서가 들어가는 곳
// $2 는 tab 했을 때 커서가 이동하는 곳