Added listToListFamily
This commit is contained in:
parent
4d4ed174e9
commit
25d6cde0d2
BIN
type-script-helper-1.2.0.vsix
Normal file
BIN
type-script-helper-1.2.0.vsix
Normal file
Binary file not shown.
@ -20,13 +20,22 @@ None
|
||||
|
||||
## Release Notes
|
||||
|
||||
cd "C:\Users\phares\source\yo_vscode"
|
||||
L:
|
||||
|
||||
cd "L:\GitHub\YO-VSCode"
|
||||
|
||||
yo code
|
||||
|
||||
Type Script Helper
|
||||
|
||||
(type-script-helper)
|
||||
|
||||
Modify .package
|
||||
|
||||
Add publisher
|
||||
|
||||
cd type-script-helper
|
||||
|
||||
vsce package
|
||||
|
||||
F1
|
||||
|
@ -3,8 +3,9 @@
|
||||
"displayName": "Type Script Helper",
|
||||
"description": "Helper for VS Code in TypeScript",
|
||||
"publisher": "IFX",
|
||||
"version": "1.1.5",
|
||||
"engines": {
|
||||
"repository": "https://github.com/mikepharesjr/YO-VSCode/tree/master/type-script-helper",
|
||||
"version": "1.2.0",
|
||||
"engines": {
|
||||
"vscode": "^1.40.0"
|
||||
},
|
||||
"categories": [
|
||||
@ -16,6 +17,7 @@
|
||||
"onCommand:helper.addVBComment",
|
||||
"onCommand:helper.convertToRegularExpression",
|
||||
"onCommand:helper.expandSql",
|
||||
"onCommand:helper.listToListFamily",
|
||||
"onCommand:helper.prettySql",
|
||||
"onCommand:helper.removeComment",
|
||||
"onCommand:helper.sortNormal",
|
||||
@ -29,6 +31,8 @@
|
||||
{ "command": "helper.addVBComment", "title": "Add VB Comment" },
|
||||
{ "command": "helper.expandSql", "title": "Expand Sql" },
|
||||
{ "command": "helper.convertToRegularExpression", "title": "Convert to Regular Expression" },
|
||||
{ "command": "helper.expandSql", "title": "Expand Sql" },
|
||||
{ "command": "helper.listToListFamily", "title": "List to list family (Kristy, Mike ...)" },
|
||||
{ "command": "helper.prettySql", "title": "Pretty Sql" },
|
||||
{ "command": "helper.removeComment", "title": "Remove comment" },
|
||||
{ "command": "helper.sortNormal", "title": "My Sort lines (ascending, case sensitive)" },
|
||||
|
@ -29,6 +29,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
vscode.commands.registerCommand('helper.addVBComment', helper.addVBComment),
|
||||
vscode.commands.registerCommand('helper.convertToRegularExpression', helper.convertToRegularExpression),
|
||||
vscode.commands.registerCommand('helper.expandSql', helper.expandSql),
|
||||
vscode.commands.registerCommand('helper.listToListFamily', helper.listToListFamily),
|
||||
vscode.commands.registerCommand('helper.prettySql', helper.prettySql),
|
||||
vscode.commands.registerCommand('helper.removeComment', helper.removeComment),
|
||||
vscode.commands.registerCommand('helper.sortNormal', helper.sortNormal),
|
||||
|
@ -9,6 +9,7 @@ enum LinesAction {
|
||||
addVBComment,
|
||||
convertToRegularExpression,
|
||||
expandSql,
|
||||
listToListFamily,
|
||||
prettySql,
|
||||
removeComment,
|
||||
sortNormal,
|
||||
@ -105,6 +106,12 @@ function expandSqlLogic(lines: string[]): void {
|
||||
prettySqlLogic(lines);
|
||||
}
|
||||
|
||||
function listToListFamilyLogic(lines: string[]): void {
|
||||
for (let i = 0; i < lines.length; ++i) {
|
||||
lines[i] = "Kristy" + lines[i].trim() + "Mike" + lines[i].trim() + "Jason" + lines[i].trim() + "Mackenzie" + lines[i].trim() + "Logan" + lines[i].trim() + "Lilly" + lines[i].trim() + "Chelsea" + lines[i].trim() + "Pipper" + lines[i].trim();
|
||||
}
|
||||
}
|
||||
|
||||
function prettySqlLogic(lines: string[]): void {
|
||||
for (let i = 0; i < lines.length; ++i) {
|
||||
lines[i] = ' ' + lines[i];
|
||||
@ -223,6 +230,7 @@ function linesFunction(linesAction: LinesAction): Thenable<boolean> | undefined
|
||||
case LinesAction.addVBComment: { addVBCommentLogic(lines); break; }
|
||||
case LinesAction.convertToRegularExpression: { lines = convertToRegularExpressionLogic(lines); break; }
|
||||
case LinesAction.expandSql: { expandSqlLogic(lines); break; }
|
||||
case LinesAction.listToListFamily: { listToListFamilyLogic(lines); break; }
|
||||
case LinesAction.prettySql: { prettySqlLogic(lines); break; }
|
||||
case LinesAction.removeComment: { removeCommentLogic(lines); break; }
|
||||
case LinesAction.sortNormal: { sortNormalLogic(lines); break; }
|
||||
@ -238,6 +246,7 @@ export const addCSharpComment = () => linesFunction(LinesAction.addCSharpComment
|
||||
export const addVBComment = () => linesFunction(LinesAction.addVBComment);
|
||||
export const convertToRegularExpression = () => linesFunction(LinesAction.convertToRegularExpression);
|
||||
export const expandSql = () => linesFunction(LinesAction.expandSql);
|
||||
export const listToListFamily = () => linesFunction(LinesAction.listToListFamily);
|
||||
export const prettySql = () => linesFunction(LinesAction.prettySql);
|
||||
export const removeComment = () => linesFunction(LinesAction.removeComment);
|
||||
export const sortNormal = () => linesFunction(LinesAction.sortNormal);
|
||||
|
Loading…
x
Reference in New Issue
Block a user