1 Star 0 Fork 0

逆光影者/my-txt-tool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
package.json 6.84 KB
一键复制 编辑 原始数据 按行查看 历史
逆光影者 提交于 2022-12-21 23:32 . 添加自定义文本处理功能
{
"name": "my-txt-tool",
"displayName": "my-txt-tool",
"description": "Used for various processing of text",
"version": "0.2.0",
"publisher": "cpf",
"repository": "git@github.com:cpfree/my-txt-tool.git",
"engines": {
"vscode": "^1.63.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onCommand:myTxtTool.combineLine",
"onCommand:myTxtTool.wrapLine",
"onCommand:myTxtTool.suitRow",
"onCommand:myTxtTool.formatAll",
"onCommand:myTxtTool.fullToHalf_corner",
"onCommand:myTxtTool.halfToFull_corner",
"onCommand:myTxtTool.setOneSpaceAfterHalfCorner",
"onCommand:myTxtTool.clearSpaceAfterHalfCorner",
"onCommand:myTxtTool.oneSpaceBetweenEnAndCn",
"onCommand:myTxtTool.insertBackquoteBetweenEnAndCn",
"onCommand:myTxtTool.customTxtActions"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "myTxtTool.combineLine",
"title": "txt-tool: combine line"
},
{
"command": "myTxtTool.wrapLine",
"title": "txt-tool: wrap line"
},
{
"command": "myTxtTool.suitRow",
"title": "txt-tool: suit row"
},
{
"command": "myTxtTool.formatAll",
"title": "txt-tool: format all"
},
{
"command": "myTxtTool.fullToHalf_corner",
"title": "txt-tool: 全角字符 -> 半角字符"
},
{
"command": "myTxtTool.halfToFull_corner",
"title": "txt-tool: 半角字符 -> 全角字符"
},
{
"command": "myTxtTool.setOneSpaceAfterHalfCorner",
"title": "txt-tool: 半角字符后设置一个空格"
},
{
"command": "myTxtTool.clearSpaceAfterHalfCorner",
"title": "txt-tool: 半角字符后清除空格"
},
{
"command": "myTxtTool.oneSpaceBetweenEnAndCn",
"title": "txt-tool: 中英文之间设置一个空格"
},
{
"command": "myTxtTool.insertBackquoteBetweenEnAndCn",
"title": "txt-tool: 中文之间的单个单词两边加上空格和反斜杠"
},
{
"command": "myTxtTool.customTxtActions",
"title": "%commands.customTxtActions.description%"
}
],
"menus": {
"editor/title": [
{
"when": "resourceExtname == .txt && config.mytexttool.enableCombineLine",
"command": "myTxtTool.combineLine",
"group": "navigation"
},
{
"when": "resourceExtname == .txt && config.mytexttool.enableWrapLine",
"command": "myTxtTool.wrapLine",
"group": "navigation"
},
{
"when": "resourceExtname == .txt && config.mytexttool.enableSuitRow",
"command": "myTxtTool.suitRow",
"group": "navigation"
},
{
"when": "resourceExtname == .md",
"command": "myTxtTool.setOneSpaceAfterHalfCorner",
"group": "navigation"
},
{
"when": "resourceExtname == .md",
"command": "myTxtTool.clearSpaceAfterHalfCorner",
"group": "navigation"
},
{
"when": "resourceExtname == .md",
"command": "myTxtTool.customTxtActions",
"group": "navigation"
}
]
},
"configuration": {
"type": "object",
"title": "my text tool",
"properties": {
"mytexttool.enableCombineLine": {
"type": "boolean",
"default": true,
"description": "Enable combine line"
},
"mytexttool.enableWrapLine": {
"type": "boolean",
"default": true,
"description": "Enable wrap line"
},
"mytexttool.enableSuitRow": {
"type": "boolean",
"default": true,
"description": "Enable suit row"
},
"mytexttool.formatRowPrefix": {
"type": "string",
"enum": [
"\r\n ",
"\r\n  ",
" ",
"  "
],
"markdownEnumDescriptions": [
"%config.formatRowPrefix.enumDescriptions.threeEnSpaceAndRow%",
"%config.formatRowPrefix.enumDescriptions.twoCnSpaceAndRow%",
"%config.formatRowPrefix.enumDescriptions.threeEnSpace%",
"%config.formatRowPrefix.enumDescriptions.twoCnSpace%"
],
"default": "\r\n ",
"description": "%config.formatRowPrefix.description%"
},
"mytexttool.actions": {
"type": "array",
"items": {
"type": "object"
},
"description": "%config.customTxtActions.description%",
"default": [
{
"enable": true,
"label": "replace(\\\\, \\).replace(\\\", \") ",
"actions": [
{
"type": "replace",
"expression": "\\\\\\\\",
"param1": "\\"
},
{
"type": "replace",
"expression": "\\\\\\\"",
"param1": "\""
}
]
},
{
"enable": true,
"label": "matches ipv4",
"actions": [
{
"type": "matches",
"expression": "((25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d)))\\.){3}(25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d)))",
"param1": ""
}
]
}
]
}
}
}
},
"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.63.0",
"@types/glob": "^7.1.4",
"@types/mocha": "^9.0.0",
"@types/node": "14.x",
"@typescript-eslint/eslint-plugin": "^5.1.0",
"@typescript-eslint/parser": "^5.1.0",
"eslint": "^8.1.0",
"glob": "^7.1.7",
"mocha": "^9.1.3",
"typescript": "^4.4.4",
"@vscode/test-electron": "^1.6.2"
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/cpfree/my-txt-tool.git
git@gitee.com:cpfree/my-txt-tool.git
cpfree
my-txt-tool
my-txt-tool
main

搜索帮助