VSCodeVim / VSCodeVim/Vim

Block cursor remains in files, even after vim toggled off

Open
#8,634 0 comments 0 reactions 0 assignees View on GitHub

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 you toggle vim on, your cursor goes from being a caret to being a block cursor. When you toggle vim off, it goes back to being a caret.

However, when you toggle vim off, and then switch focus into other open tabs, the open tabs still have the block cursor.

To Reproduce

  1. Open 2 code tabs with Vim extension enabled. Note block cursors.
  2. Focus one code tab and toggle vim off with the toggleVim command. Note the cursor switched from block cursor to caret.
  3. Switch to the other code tab. Notice that tab still has a block cursor.

Expected behavior
When you use toggleVim to enable/disable vim, it should change the caret across all open tabs. Not just the currently selected one.

This is, visually, the most apparent mechanism for determining what state your current tab is in. I often toggle between vim mode and standard mode.

Screenshots

Here you can see me toggling VS code off in one tab but the block cursor remains in the other tab.

https://github.com/VSCodeVim/Vim/assets/6633831/26113e1a-4304-4e53-a74c-3a5340aa470a

Environment:

  • Extension (VsCodeVim) version: 1.26.0
  • VSCode version: 1.82.2
  • OS: Windows 11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with two open code tabs, then trace the toggleVim command and the cursor state handling in the extension. The fix is complete when toggling Vim updates the cursor in every open code tab, and the relevant tests pass or are added for this two-tab scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.