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 #9487

Open
changhoon-sung opened this issue Feb 16, 2025 · 0 comments

Comments

@changhoon-sung
Copy link

changhoon-sung commented Feb 16, 2025

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'"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant