Macros goes on and on
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
When I simply apply a Macro on more than the number of lines in the file, the macros don't stop at the end of the file but goes on and on. eg. If the number of lines is 5 and I apply it 10 times i.e 10@@, It won't stop on the 5th line, but repeat itself 10 times on the last line of the file.
To Reproduce
Steps to reproduce the behavior:
- Record a macro like
qq <Shift>I<p><Esc><Shift>A</p>jq - Apply it on the first line
@q - Then again all the lines of the file
10@@ - See the last line
Expected behavior
It is supposed to be stopped on the 5th line.
Screenshots

- Extension (VsCodeVim) version: 1.0.1
- VSCode version: 1.30.2
- OS: Linux Mint 19 Tara x86_64
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 by reproducing the recorded macro with 10@@ in a five-line file, then trace the macro replay path for repeated @ execution. The fix is done when replay stops at the end of the file instead of repeating on the final line, while normal macro behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100