Failed to handle key `<tab>`: Invalid regular expression: /^*.py/: Nothing to repeat
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
To Reproduce
Steps to reproduce the behavior: in the editor, simply look for a file to import from any directory. In vim this is typically :r /path/to/files/*.py with tab completion.
VSCodeVim version: 1.24.1
Stack trace
SyntaxError: Failed to handle key `<tab>`: Invalid regular expression: /^*.py/: Nothing to repeat
at new RegExp (<anonymous>)
at n.run (/Users/mrogers/.vscode/extensions/vscodevim.vim-1.24.1/src/actions/commands/commandLine.ts:124:38)
at process.mode (node:internal/process/task_queues:96:5)
at n.i [as exec] (/Users/mrogers/.vscode/extensions/vscodevim.vim-1.24.1/src/actions/commands/commandLine.ts:33:60)
at n.execCount (/Users/mrogers/.vscode/extensions/vscodevim.vim-1.24.1/src/actions/base.ts:184:42)
at N.actionToRecord [as runAction] (/Users/mrogers/.vscode/extensions/vscodevim.vim-1.24.1/src/mode/modeHandler.ts:739:47)
at N.handledAsAction [as handleKeyAsAnAction] (/Users/mrogers/.vscode/extensions/vscodevim.vim-1.24.1/src/mode/modeHandler.ts:688:43)
at N.mh [as handleKeyEvent] (/Users/mrogers/.vscode/extensions/vscodevim.vim-1.24.1/src/mode/modeHandler.ts:505:11)
at r (/Users/mrogers/.vscode/extensions/vscodevim.vim-1.24.1/extensionBase.ts:491:15)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/actions/commands/commandLine.ts around line 124, where the stack trace shows the regular expression is created, and reproduce the :r /path/to/files/*.py tab-completion case in VSCodeVim 1.24.1. Done means tab completion no longer throws the “Nothing to repeat” error for this wildcard input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100