-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.json
152 lines (152 loc) · 8.07 KB
/
package.json
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{
"name": "copy-code-block",
"displayName": "Copy Code Block",
"description": "Copy code with filename and line number, customized format.",
"version": "0.0.11",
"publisher": "Matsuyanagi",
"engines": {
"vscode": "^1.77.0"
},
"categories": [
"Other"
],
"keywords": [
"copy",
"markdown",
"filename",
"line number"
],
"repository": {
"type": "git",
"url": "https://github.com/Matsuyanagi/vscode-copy-code-block.git"
},
"activationEvents": [],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "extension.copyCodeBlock",
"title": "Copy code block",
"category": "CopyCodeBlock"
}
],
"configuration": {
"type": "object",
"title": "Copy Code Block Configuration",
"properties": {
"copyCodeBlock.formats": {
"type": "array",
"items": {
"type": "object",
"title": "format elements",
"properties": {
"formatName": {
"type": "string",
"description": "Format name.It is specified by args of keybinding."
},
"codeBlockHeaderFormat": {
"type": "string",
"default": "${fullPath}:${topLineNumber}${EOL}",
"description": "Specifies the format of the code block header lines.\nAvailable tokens:\n ${fullPath} : Filename full path.\n ${workspaceFolderRelativePath} : Filename relative path from workspaceFolder.\n ${fileBasename} : Filename.\n ${fileExtname} : Filename Extension.\n ${fileBasenameWithoutExtension}: Filename without extension.\n ${workspaceFolder} : Workspace folder path.\n ${fileDirname} : Dirname\n ${pathSeparator} : OS pathSeparator\n ${pathParse.root} : Node.js path.parse() function's 'root'\n ${pathParse.dir} : Node.js path.parse() function's 'dir'\n ${pathParse.base} : Node.js path.parse() function's 'base'\n ${pathParse.ext} : Node.js path.parse() function's 'ext'\n ${pathParse.name} : Node.js path.parse() function's 'name'\n ${languageId} : Language on vscode.\n ${topLineNumber} : Code selection's top line number.\n ${YYYY} : Current year 4-digit. These names conform to 'Moment.js'.\n ${MM} : Current month \"01\"-\"12\"\n ${DD} : Current day \"01\"-\"31\"\n ${HH} : Current hour \"01\"-\"12\"\n ${mm} : Current minutes \"01\"-\"59\"\n ${ss} : Current second \"01\"-\"59\"\n ${osEOL} : OS end of line. windows:\"\\r\\n\", linux/macOS:\"\\n\"\n ${EOL} : Editors end of line.\n ${LF} : \"\\n\"\n ${CRLF} : \"\\r\\n\"\n"
},
"codeBlockFooterFormat": {
"type": "string",
"default": "",
"description": "Code block footer format. The available tokens are the same as codeBlockHeaderFormat."
},
"codeLineFormat": {
"type": "string",
"default": "${LINENUMBER}: ${CODE}${EOL}",
"description": "The available tokens are the following in addition to codeBlockHeaderFormat.\n${LINENUMBER} : Line number.\n${CODE} : line text."
},
"multipleSelectionCreateMultipleCodeBlocks": {
"type": "boolean",
"default": false,
"description": "If true is specified, multiple selections will generate multiple code blocks.\nWhen false is specified, it is grouped into one code block with \"multipleSelectionsBoundalyMarkerFormat\" as a delimiter."
},
"multipleSelectionsBoundalyMarkerFormat": {
"type": "string",
"default": "---${EOL}",
"description": "Delimiter when \"multipleSelectionCreateMultipleCodeBlocks\" is set to true."
},
"forcePathSeparatorSlash": {
"type": "boolean",
"default": false,
"description": "Forcibly replace path separator with slash."
},
"forceSpaceIndent": {
"type": "boolean",
"default": false,
"description": "Force space indentation."
}
}
},
"description": "Copy Formats",
"default": [
{
"formatName": "default",
"codeBlockHeaderFormat": "${fullPath}:${topLineNumber}${EOL}",
"codeBlockFooterFormat": "",
"codeLineFormat": "${LINENUMBER}: ${CODE}${EOL}",
"multipleSelectionCreateMultipleCodeBlocks": false,
"multipleSelectionsBoundalyMarkerFormat": "---${EOL}",
"forcePathSeparatorSlash": false,
"forceSpaceIndent": false
},
{
"formatName": "markdown",
"codeBlockHeaderFormat": "${fullPath}:${topLineNumber}${EOL}```${languageId}${EOL}",
"codeBlockFooterFormat": "```${EOL}",
"codeLineFormat": "${CODE}${EOL}",
"multipleSelectionCreateMultipleCodeBlocks": false,
"multipleSelectionsBoundalyMarkerFormat": "---${EOL}",
"forcePathSeparatorSlash": true,
"forceSpaceIndent": true
}
]
}
},
"keybindings": [
{
"command": "extension.copyCodeBlock",
"key": "alt+j alt+1",
"mac": "cmd+j cmd+1",
"when": "editorTextFocus",
"args": {
"formatName": "default"
}
},
{
"command": "extension.copyCodeBlock",
"key": "alt+j alt+2",
"mac": "cmd+j cmd+2",
"when": "editorTextFocus",
"args": {
"formatName": "markdown"
}
}
]
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/vscode": "^1.77.0",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
"@types/node": "16.x",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"eslint": "^8.36.0",
"glob": "^8.1.0",
"mocha": "^10.2.0",
"typescript": "^4.9.5",
"@vscode/test-electron": "^2.3.0"
}
}