Skip to content

[Spec]Dot repeat (.) incorrectly replays non-editing Ex commands like :bn, :<number>, :pwd #9807

@coxxny

Description

@coxxny

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:

  1. Open any file.
  2. Execute an Ex command that does not change the buffer such as :bn and :b<number>.
  3. Press . in Normal mode.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions