Indent in VIM mode deselects

Hi, thanks for reporting an issue with Cursor.

Before you report this, we’d appreciate if you can search this forum to see if this issue has already been reported.

If you have done so, please check this box.
on

Describe the Bug

In VIM mode, when you select a block of text and then do Shift-< to dedent or Shift-> to indent, Cursor deselects the block so you can’t do multiple indents/dedents in a row.

Steps to Reproduce

Use VIM mode, select text, try to indent or dedent multiple times.

Expected Behavior

I expect it to not deselect the text so you can indent/detent multiple times.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 0.44.9
VSCode Version: 1.93.1
Commit: 316e524257c2ea23b755332b0a72c50cf23e1b00
Date: 2024-12-26T21:58:59.149Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 24.2.0

Additional Information

It’s frustrating.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, out of interest, does this happen in VS Code as well, or does this feature work as intended there?

I ran Visual Studio Code and installed VsCodeVim from the extensions manager. And that has the same issue.

Going on the theory that this is the same plugin, I added this to my settings.json:

    "vim.visualModeKeyBindings": [
        {
            "before": [
                ">"
            ],
            "commands": [
                "editor.action.indentLines"
            ]
        },
        {
            "before": [
                "<"
            ],
            "commands": [
                "editor.action.outdentLines"
            ]
        },
    ]

And it works great!

Glad to hear you figured this out!