VSCodeVim / VSCodeVim/Vim

No way to escape from VisualMode to NormalMode on Jupyter Focused Cell

Open
#9,487 1 comment 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
This bug occurs when using the Vim extension together with the Jupyter Notebook extension in VSCode. In a Jupyter Notebook focused cell, pressing the Esc key alone does not transition from Visual Mode back to Normal Mode.

To Reproduce
Steps to reproduce the behavior:

  1. Install the Jupyter Notebook extension and open a .ipynb file.
  2. Select any cell and enter Visual Mode by pressing the v key.
  3. Attempt to return to Normal Mode by pressing the Esc key.
  4. Check the visual mode remaining on the bottom status bar.

Expected behavior
Pressing the Esc key should transition from Visual Mode to Normal Mode while maintaining focus on the Jupyter Notebook cell.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.29.0
  • VSCode version: 1.97.2
  • OS: macOS Sequoia 15.3.1 (24D70)

Additional context
Pressing Esc first causes the Jupyter Notebook to lose focus (notebookCellEditorFocused changes from true to false).

However, Visual Mode remains active.

Since editorFocus is also lost when the cell loosing the focus, there's no way to escape from Visual Mode to Normal Mode.

Workaround

{
  "key": "escape",
  "command": "extension.vim_escape",
  "when": "notebookEditorFocused && vim.active && vim.mode == 'Visual'"
}

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

Reproduce the issue in VSCode with a Jupyter Notebook focused cell, then start from the shown extension.vim_escape workaround and its notebook focus conditions. Trace how Escape is handled when notebookCellEditorFocused changes to false. Done means pressing Esc in Visual Mode returns to Normal Mode while keeping focus on the Jupyter cell.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.