[TOC]
## For JSON.JSON(写代码片段专用)
>[info] json.json
```json
{
// ........START snippets variables.............
// Author: 877675862@qq.com
// Date: 2018/10/13
// Version: v1.0.0
// Note: 转摘请声明出处。
"Print to snippet": {
"prefix": "pr",
"body": [
"\"Print to ${towhat}\":{",
" \"prefix\":\"${pre}\",",
" \"body\":[",
" \"${body}\"",
" ],",
" \"description\":\"${des}\"",
"}"
],
"description": "For snippets"
},
"Print to TM-FILENAME": {
"prefix": "tm",
"body": [
"${foo:\"\\${TM_FILENAME\\}\"}"
],
"description": "For tm_filename:获取当前文件名。"
},
"Print to TM-FILENAME-BASE": {
"prefix": "tm",
"body": [
"${foo:\"\\${TM_FILENAME_BASE\\}\"}"
],
"description": "For tm_filename_base:获取当前文件类型。"
},
"Print to TM-DIRECTORY": {
"prefix": "tm",
"body": [
"${foo:\"\\${TM_DIRECTORY\\}\"}"
],
"description": "For tm_directory:获取当前文件夹。"
},
"Print to TM-FILEPATH": {
"prefix": "tm",
"body": [
"${foo:\"\\${TM_FILENAPATH\\}\"}"
],
"description": "For tm_filepath:获取当前文件路径。"
},
"Print to TM-CLIPBOARD": {
"prefix": "tm",
"body": [
"${foo:\"\\${TM_CLIPBOARD\\}\"}"
],
"description": "For tm_clipboard:获取剪贴板的内容。"
},
"Print to TM-SELECTED-TEXT": {
"prefix": "tm",
"body": [
"${foo:\"\\${TM_SELECTED-TEXT\\}\"}"
],
"description": "For tm_selected-text:获取鼠标选取的字符或者空字符。"
},
"Print to TM-CURRENT-LINE": {
"prefix": "tm",
"body": [
"${foo:\"\\${TM_CURRENT_LINE\\}\"}"
],
"description": "For tm_current_line:当前行的内容。"
},
"Print to TM-CURRENT-WORD": {
"prefix": "tm",
"body": [
"${foo:\"\\${TM_CURRENT-WORD\\}\"}"
],
"description": "For tm_current_word:光标下的单词内容或者空字符。"
},
"Print to TM-LINE-INDEX": {
"prefix": "tm",
"body": [
"${foo:\"\\${TM_LINE_INDEX\\}\"}"
],
"description": "For tm_line_index:基于0索引的行号。"
},
"Print to TM-LINE-NUMBER": {
"prefix": "tm",
"body": [
"${foo:\"\\${TM_LINE_NUMBER\\}\"}"
],
"description": "For tm_line_number:基于单索引的行号。"
},
// For TM date
"Print to CURRENT-YEAR": {
"prefix": "cur",
"body": [
"${foo:\"\\${CURRENT_YEAR\\}\"}"
],
"description": "获取本年度。YYYY"
},
"Print to CURRENT-YEAR-SHORT": {
"prefix": "cur",
"body": [
"${foo:\"\\${CURRENT_YEAR_SHORT\\}\"}"
],
"description": "本年度的最后两位数。"
},
"Print to CURRENT-MOTH": {
"prefix": "cur",
"body": [
"${foo:\"\\${CURRENT_MONTH\\}\"}"
],
"description": "本月 MM"
},
"Print to CURRENT-MOTH-NAME": {
"prefix": "cur",
"body": [
"${foo:\"\\${CURRENT_MONTH_NAME\\}\"}"
],
"description": "本月名称 英文(example: July)",
},
"Print to CURRENT-MOTH-NAME-SHORT": {
"prefix": "cur",
"body": [
"${foo:\"\\${CURRENT_MONTH_NAME_SHORT\\}\"}"
],
"description": "本月 英文简写(example:Jul)"
},
"Print to CURRENT-DATE": {
"prefix": "cur",
"body": [
"${foo:\"\\${CURRENT_DATE\\}\"}"
],
"description": "今天 DD"
},
"Print to CURRENT-DATE-NAME": {
"prefix": "cur",
"body": [
"${foo:\"\\${CURRENT_DATE_NAME\\}\"}"
],
"description": "星期几"
},
"Print to CURRENT-DATE-NAME-SHORT": {
"prefix": "cur",
"body": [
"${foo:\"\\${CURRENT_DATE_NAME_SHORT\\}\"}"
],
"description": "星期几简写"
},
"Print to CURRENT-HOUR": {
"prefix": "cur",
"body": [
"${foo:\"\\${CURRENT_HOUR\\}\"}"
],
"description": "24小时制的当前小时。"
},
"Print to CURRENT-MINUTE": {
"prefix": "cur",
"body": [
"${foo:\"\\${CURRENT_MINUTE\\}\"}"
],
"description": "分钟"
},
"Print to CURRENT-SECOND": {
"prefix": "cur",
"body": [
"${foo:\"\\${CURRENT_SECOND\\}\"}"
],
"description": "秒钟"
},
// .......END snippets variables..........
}
```
## For JS file Header
>[info]javascript.json
```json
"Print to JSheader":{
"prefix": "jsh",
"body": [
"/**",
" * ",
" * @file ${TM_FILENAME}",
" * @author ${name} <${homepage}>",
" * @description ${des}",
" * Date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
" * Note: 转摘请注明出处!!!",
" * ",
" */"
]
}
```