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

Vim undo and redo shortcuts not working #136245

Closed
paluchasz opened this issue Oct 30, 2021 · 4 comments
Closed

Vim undo and redo shortcuts not working #136245

paluchasz opened this issue Oct 30, 2021 · 4 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension notebook-workbench-integration VIM VIM issue

Comments

@paluchasz
Copy link

Same issue as microsoft/vscode-jupyter#4581 but it still isn't resolved and I can't reopen or comment on the old ticket.

Environment data

  • VS Code version: 1.61.0
  • Jupyter Extension version (available under the Extensions sidebar): v2021.9.1101343141
  • Python Extension version (available under the Extensions sidebar): v2021.10.1365161279
  • Vim (vscodevim) Extension version: v1.21.10
  • OS (Windows | Mac | Linux distro) and version: MacOS Big Sur 11.5.2
  • Python and/or Anaconda version: 3.7.10
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pyenv
  • Jupyter server running: N/A

Expected behaviour

If you make some changes in a cell, e.g. dd to delete a line then normally in vim you can press u to undo the change and ctrl-R to redo the change.

Actual behaviour

But this doesn't work and you have to use the standard Cmd-z vscode shortcut to undo and Shift-Cmd-Z to redo.

Steps to reproduce:

Open a jupyter notebook with vscodevim extension installed. Go into a cell. Make a change. Press Esc. Press u to undo the change.

@paluchasz
Copy link
Author

I actually just found a workaround for this though it would be nice if enabled by default. Following this post I added the following

"vim.normalModeKeyBindings": [ 
        {
            "before": ["u"], 
            "after": [],
            "commands": [
                {
                    "command": "undo", 
                    "args": []
                }
            ] 
        },
        {
            "before": ["<C-r>"], 
            "after": [],
            "commands": [
                {
                    "command": "redo", 
                    "args": []
                }
            ] 
        }  
    ]

to my settings.json (open command palette and search for Open Settings (Json) to edit).

@rchiodo
Copy link
Contributor

rchiodo commented Nov 1, 2021

VIM support would be handled by VS code itself. Jupyter extension doesn't do anything special here.

@rchiodo rchiodo transferred this issue from microsoft/vscode-jupyter Nov 1, 2021
@tekboart
Copy link

Hi,
I could solve the issue with the solution provided by @khanhhuy on this link:

VSCodeVim/Vim#2007 (comment)

hope it works for your too.
yours,
tekboar

@rebornix rebornix added the *caused-by-extension Issue identified to be caused by an extension label Dec 2, 2022
@vscodenpa
Copy link

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension notebook-workbench-integration VIM VIM issue
Projects
None yet
Development

No branches or pull requests

8 participants
@rebornix @DonJayamanne @paluchasz @claudiaregio @rchiodo @tekboart @vscodenpa and others