VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.96k stars 1.32k forks source link

Editor automatically switch to Visual mode when use expand-region extension. #5230

Open sharkrice opened 4 years ago

sharkrice commented 4 years ago

Describe the bug In the new version of insert mode, when you use the expand-region extension's shortcut Ctrl+w or (other shortcut keys are the same) to select a word, it will automatically switch to visual mode.

To Reproduce Steps to reproduce the behavior:

  1. Install expand-region
  2. The editor switches to Insert Mode
  3. Press Ctrl+w to select a word
  4. The editor automatically switches to Visual Mode

Even set useCtrlKeys false and handleKeys \<C-w> false, same above.

Expected behavior Don't automatically switch to visual mode, as older version.

Environment (please complete the following information):

berknam commented 4 years ago

You are creating a selection so Vim changes to visual mode. Whenever you're working with a selection you should be in visual mode. That's how normal Vim works as well.

If you want to replace that region you just selected with something else you just press c (change) and start typing whatever you want. If you want to copy that region press y and the same applies to everything else.

What did you want to do with that region selection?