Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 2 tasks
changhoon-sung opened this issue Feb 16, 2025 · 0 comments
Open
1 of 2 tasks
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed Issue needs to be triaged

Comments

@changhoon-sung
Copy link

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

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 Vim extension and 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
  • Extension (ms-toolsai.jupyter) version: 2025.1.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'"
}

VS Code Version

1.29.0

Jupyter Extension Version

2025.1.0

Jupyter logs

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

@changhoon-sung changhoon-sung added the bug Issue identified by VS Code Team member as probable bug label Feb 16, 2025
@vs-code-engineering vs-code-engineering bot added the triage-needed Issue needs to be triaged label Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants