()
| 1599 | } |
| 1600 | |
| 1601 | export async function resetKeyBindings() { |
| 1602 | try { |
| 1603 | const fs = fsOperation(KEYBINDING_FILE); |
| 1604 | const fileName = Url.basename(KEYBINDING_FILE); |
| 1605 | const content = JSON.stringify(keyBindings, undefined, 2); |
| 1606 | if (!(await fs.exists())) { |
| 1607 | await fsOperation(DATA_STORAGE).createFile(fileName, content); |
| 1608 | return; |
| 1609 | } |
| 1610 | await fs.writeFile(content); |
| 1611 | } catch (error) { |
| 1612 | window.log?.("error", "Reset Keybinding failed!"); |
| 1613 | window.log?.("error", error); |
| 1614 | } |
| 1615 | } |
| 1616 | |
| 1617 | export { commandKeymapCompartment }; |
| 1618 |
no test coverage detected