(lines: string[])
| 525 | } |
| 526 | |
| 527 | async function parseVimRCMappings(lines: string[]): Promise<void> { |
| 528 | const config = Globals.mockConfiguration; |
| 529 | |
| 530 | // Remove all the old remappings from the .vimrc file |
| 531 | VimrcImpl.removeAllRemapsFromConfig(config); |
| 532 | |
| 533 | const vscodeCommands = await vscode.commands.getCommands(); |
| 534 | // Add the new remappings |
| 535 | for (const line of lines) { |
| 536 | const remap = await vimrcKeyRemappingBuilder.build(line, vscodeCommands); |
| 537 | if (remap) { |
| 538 | VimrcImpl.addRemapToConfig(config, remap); |
| 539 | continue; |
| 540 | } |
| 541 | const unremap = await vimrcKeyRemappingBuilder.buildUnmapping(line); |
| 542 | if (unremap) { |
| 543 | VimrcImpl.removeRemapFromConfig(config, unremap); |
| 544 | continue; |
| 545 | } |
| 546 | const clearRemap = await vimrcKeyRemappingBuilder.buildClearMapping(line); |
| 547 | if (clearRemap) { |
| 548 | VimrcImpl.clearRemapsFromConfig(config, clearRemap); |
| 549 | continue; |
| 550 | } |
| 551 | } |
| 552 | } |
| 553 | |
| 554 | export type { ITestObject }; |
no test coverage detected