VSCodeVim / VSCodeVim/Vim

Hijacks Ctrl+Shift+Left/Right (switch to Visual) without option to turn this off?

Open
#5,668 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
Since about 2-3 months now, I've noticed that VIM switches from input mode to visual mode when pressing ctrl+shift+left/right. This does not happen when ctrl+left/right is used or shift+left/right is used. If both are used it does switch to the visual mode though which is a bit unpleasant since the input started in a different character position and for example in the following gif removed one more character to the right (the semicolon):

The gif first shows navigation with shift+left/right, then ctrl+left/right (both behave correctly), then ctrl+shift+left/right with x at the end (incorrect/disputed behaviour).

vim-bug

To Reproduce
Steps to reproduce the behavior:

  1. Open file
  2. Switch to input mode
  3. Navigate with ctrl+shift+left/right
  4. Observe switch to visual mode
  5. Press x or d to delete selection -> Observe that because of visual mode selection one character to the left/right is additionally removed

I haven't found a way to disable this behaviour, but this didn't used to be the default behaviour before.

Expected behavior
Either ctrl+shift+left/right preserves input mode and does not go into visual mode or an option can enable/disable this behaviour.

Screenshots
Please see above

Environment (please complete the following information):

  • Extension Version: 1.17.1
  • OS Version: Windows_NT x64 10.0.19041
  • VSCode version: 1.52.0-insider
Config
    "vim.camelCaseMotion.enable": true,
    "vim.mouseSelectionGoesIntoVisualMode": false,
    "vim.replaceWithRegister": true,
    "vim.useCtrlKeys": false,
    "vim.autoSwitchInputMethod.enable": false,
    "vim.autoindent": false,
    "vim.highlightedyank.enable": true,
    "vim.smartRelativeLine": true,
    "vim.startInInsertMode": true,
    "vim.statusBarColorControl": true,
    "vim.useSystemClipboard": true,
    "vim.easymotion": true,
    "vim.handleKeys": {
        "": false,
        "": false,
        "": false,
    },

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Reproduce the issue in VS Code using Ctrl+Shift+Left/Right while in insert mode, then trace the keybinding and mode-switching handling. Done means the shortcut preserves insert mode or has a documented option to disable the behavior, with regression coverage if the project has a relevant test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.