-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.code-snippets
84 lines (84 loc) · 4.09 KB
/
common.code-snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
// The following variables can be used:
//
// TM_SELECTED_TEXT The currently selected text or the empty string
// TM_CURRENT_LINE The contents of the current line
// TM_CURRENT_WORD The contents of the word under cursor or the empty string
// TM_LINE_INDEX The zero-index based line number
// TM_LINE_NUMBER The one-index based line number
// TM_FILENAME The filename of the current document
// TM_FILENAME_BASE The filename of the current document without its extensions
// TM_DIRECTORY The directory of the current document
// TM_FILEPATH The full file path of the current document
// RELATIVE_FILEPATH The relative (to the opened workspace or folder) file path of the current document
// CLIPBOARD The contents of your clipboard
// WORKSPACE_NAME The name of the opened workspace or folder
// WORKSPACE_FOLDER The path of the opened workspace or folder
// CURSOR_INDEX The zero-index based cursor number
// CURSOR_NUMBER The one-index based cursor number
//
// For inserting the current date and time:
//
// CURRENT_YEAR The current year
// CURRENT_YEAR_SHORT The current year's last two digits
// CURRENT_MONTH The month as two digits (example '02')
// CURRENT_MONTH_NAME The full name of the month (example 'July')
// CURRENT_MONTH_NAME_SHORT The short name of the month (example 'Jul')
// CURRENT_DATE The day of the month as two digits (example '08')
// CURRENT_DAY_NAME The name of day (example 'Monday')
// CURRENT_DAY_NAME_SHORT The short name of the day (example 'Mon')
// CURRENT_HOUR The current hour in 24-hour clock format
// CURRENT_MINUTE The current minute as two digits
// CURRENT_SECOND The current second as two digits
// CURRENT_SECONDS_UNIX The number of seconds since the Unix epoch
// CURRENT_TIMEZONE_OFFSET The current UTC time zone offset as +HH:MM or -HH:MM (example -07: 00).
//
// For inserting random values:
//
// RANDOM 6 random Base-10 digits
// RANDOM_HEX 6 random Base-16 digits
// UUID A Version 4 UUID
//
// For inserting line or block comments, honoring the current language:
//
// BLOCK_COMMENT_START Example output: in PHP /* or in HTML <!--
// BLOCK_COMMENT_END Example output: in PHP */ or in HTML -->
// LINE_COMMENT Example output: in PHP //
/**
* Place your snippets for c 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"
}
*/
/** ref links
* https://jojoldu.tistory.com/491
* https://velog.io/@rimo09/vscode-Snippet-%EB%A7%8C%EB%93%A4%EA%B8%B0
* https://born-dev.tistory.com/6
* https://ux.stories.pe.kr/290
* https://ux.stories.pe.kr/290
*/
"$cprt": {
"prefix": "$cprt",
"body": [
"Copyright $CURRENT_YEAR. ${1:Name} All rights reserved.$0"
],
"description": "Inserts a copyright statement."
},
"$licn": {
// https://muratkaragozgil.medium.com/software-licenses-on-github-which-one-should-you-choose-3d4cfbb6c2f9
"prefix": "$licn",
"body": [
"Released under the ${1|MIT License,Apache License 2.0,GNU General Public License (GPL) v3,Mozilla Public License 2.0,BSD 3-Clause License|}. See LICENSE file for details.$0"
],
"description": "Inserts a software license notice."
}
}