-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the bug
In Vim, dot repeat (.) replays the last editing (buffer-changing) action, while @: re-executes the last Ex command.
VSCodeVim currently lets . replay non-editing Ex commands such as :bn, :<number>, and :pwd.
This breaks the usual “edit → . to repeat the edit” workflow by unintentionally navigating buffers/lines instead of repeating edits. Some commands such as :w and :q are not repeated by ..
To Reproduce
Steps to reproduce the behavior:
- Open any file.
- Execute an Ex command that does not change the buffer such as
:bnand:b<number>. - Press
.in Normal mode. - See that the Ex command is re-executed (e.g., buffer advances).
Expected behavior
.should only repeat the last editing action (buffer-changing).- Non-editing Ex commands must not be replayed by
..
Screenshots
example1.txt.-.test.-.Visual.Studio.Code.2025-11-01.08-43-17.mp4
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.31.0
- VSCode version: 1.105.1
- OS: Windows 11
Additional context
While validating the fix locally, I confirmed that Ex commands are no longer repeated by .. During that verification I noticed a freeze: right after startup, if I run one of these now non-repeatable commands and then press . , the extension becomes unresponsive until reload/restart. To verify whether the issue also exists in the current (unfixed) version of the extension, I stashed my local fix and tried :w/:q as well and observed the same behavior (execute command → press . twice → freeze). Because this is an independent defect (not a spec question), I will file it as a separate issue and submit a separate PR.