Skip to content

Commit

Permalink
add option to generate handle at cursor, swap keybind
Browse files Browse the repository at this point in the history
  • Loading branch information
khbsd committed Sep 6, 2024
1 parent c43de0c commit c17a5d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions commands/insertHandleUUID.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ let uuidDisposable = vscode.commands.registerCommand('bg3-mod-helper.insertUUID'
insertText(uuidv4());
});

let insertHandleDisposable = vscode.commands.registerCommand('bg3-mod-helper.insertHandleDisposable', function () {
insertText(generateHandle());
});

let uuidReplaceDisposable = vscode.commands.registerCommand('bg3-mod-helper.generateReplaceAllUUIDs', async function () {
const editor = vscode.window.activeTextEditor;
if (!editor) {
Expand Down
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
"title": "Generate Handle",
"iconPath": "$(chip)"
},
{
"command": "bg3-mod-helper.insertHandleDisposable",
"title": "Generate Handle Here",
"iconPath": "$(chip)"
},
{
"command": "bg3-mod-helper.openStatsValidator",
"title": "Stats Validator",
Expand Down Expand Up @@ -321,7 +326,7 @@
"when": "editorTextFocus"
},
{
"command": "bg3-mod-helper.insertHandle",
"command": "bg3-mod-helper.insertHandleDisposable",
"key": "ctrl+shift+h",
"when": "editorTextFocus"
},
Expand Down Expand Up @@ -416,6 +421,11 @@
"command": "bg3-mod-helper.insertHandle",
"group": "navigation@0"
},
{
"when": "editorTextFocus",
"command": "bg3-mod-helper.insertHandleDisposable",
"group": "navigation@0"
},
{
"when": "editorTextFocus",
"submenu": "bg3ModHelper.exportToolsSubmenu",
Expand Down

0 comments on commit c17a5d0

Please sign in to comment.