question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

undo in vim extension can't be redo-ed by the redo command of vscode

See original GitHub issue

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

What happened: The action of the u command cannot be redo-ed by ⇧⌘Z(which is the redo key of vscode, which did nothing).

What did you expect to happen: The affect of the u command should no longer take place.

How to reproduce it (as minimally and precisely as possible):

  1. Type any text with vim extension enabled Result: test me

  2. Use the u command Result: (blank)

  3. Try redo with vscode Result: (blank) Which I expect to be: test me

Environment:

  • Extension (VsCodeVim) version: 0.11.5
  • VSCode version: 1.22.2
  • OS version: Darwin x64 17.5.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

88reactions
coppyCcommented, Mar 28, 2019

I rewirte the action on “u” and <c-r>, now it work very well, it use the vscode undo and redo command. setting.json

    "vim.useCtrlKeys": true,
    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": ["u"],
            "commands": ["undo"]
        },
        {
            "before": ["<C-r>"],
            "commands": ["redo"]
        }
    ],

and I expect the extension do it default.

35reactions
rjhilgefortcommented, Feb 9, 2019

ctrl+r wasn’t working for me but I was able to bind redo to a different keybinding:

    {
        "key": "shift+u",
        "command": "extension.vim_ctrl+r",
        "when": "textInputFocus && vim.mode != 'Insert'"
    },
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to "redo" in Vim plugin? : r/vscode - Reddit
Ctrl-R just opens some command bar and doesn't "undo" like it does in Vim. And going to the menu bar and clicking "undo"...
Read more >
vim & vscode: remapping redo to "U" - Stack Overflow
I am trying to remap the redo command to "U" do that "u" will undo and "U" will redo. I am using vim...
Read more >
User and Workspace Settings - Visual Studio Code
To open the Settings editor, use the following VS Code menu command: ... bar remembers your settings search queries and supports Undo/Redo (Ctrl+Z/Ctrl+Y)....
Read more >
Why is it so hard to see code from 5 minutes ago?
Emacs does indeed have a plugin for this called "undo-tree". ... Undo/Redo shortcuts and a button to see the history in a timeline, ......
Read more >
Undoing and Redoing Changes | MPS - JetBrains
The Redo command discards the results of the last Undo command. You can undo or redo your changes as many times as required....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found