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

Visual Mode + 'S' Not Working #4072

Closed
DanDPanda opened this issue Sep 13, 2019 · 9 comments
Closed

Visual Mode + 'S' Not Working #4072

DanDPanda opened this issue Sep 13, 2019 · 9 comments

Comments

@DanDPanda
Copy link

DanDPanda commented Sep 13, 2019

Describe the bug
When I grab multiple lines of text in visual mode and click S, it is expected that it deletes all lines that are selected and puts me into insert mode. But what is happening instead is that it puts me into insert mode and allows me to insert one character at the start and beginning of the selection.

To Reproduce
Steps to reproduce the behavior:

  1. Open the file and focus to some text.
  2. Click v to enter visual mode.
  3. Click jj to select two lines down.
  4. Click S to attempt to delete the selected lines.
  5. Click e to see that an 'e' has been inserted into the location where you started and ended the selection.

Expected behavior
When I grab multiple lines of text in visual mode and click S, it is expected that it deletes all lines that are selected and puts me into insert mode.

Screenshots
Select

Environment (please complete the following information):

Extension (VsCodeVim) version: 1.10.2
VSCode version: 1.38.1
OS: macOS Mojave 10.14.6

Additional context
I'm no VIM expert, but it seems like S isn't the only key to have issues in visual mode. Selecting in visual mode and clicking I or A also seem to reproduce unintentional behavior.

@DanDPanda
Copy link
Author

So just a quick question, was there ever a version in which this command worked as intended? I swear I had no problem with this plugin back then, but ever since I tried it out again recently, it has been the only thing that has been holding me back from using the plugin.

@J-Fields
Copy link
Member

No, as far as I can tell, it's never been supported in visual mode. I'll get to this when I have the chance; in the meantime, you can use c in visual-line mode to get the same effect, though I know changing muscle is stubborn.

@1ntEgr8
Copy link

1ntEgr8 commented Oct 11, 2019

@J-Fields I want to give this a try

@J-Fields
Copy link
Member

@1ntEgr8 Awesome, thanks! I'll assign the issue to you.

@micklett
Copy link

Hi, myself and @bdomanski would like to take a look at this one as well as we are close to finishing up our first PR.

@J-Fields J-Fields assigned micklett and unassigned 1ntEgr8 Nov 24, 2019
@J-Fields
Copy link
Member

Sweet, thanks @micklett!

@anuragsati
Copy link

Hello @J-Fields i would love to work on this issue.

@J-Fields
Copy link
Member

Duplicate of #4812

This was fixed by d43a6e1

@loganbnielsen
Copy link

loganbnielsen commented Mar 17, 2023

Hi, this behavior appears to conflict with what's expected with vim.surround plugin which comes with the extension.

With vim.surround the expected behavior in visual mode is this:

Image in that I'm in visual mode and have is some highlighted from the following text.

here is some text

Pressing the keys S) should convert this to

here (is some) text

Should I open another ticket for this?

Doc: https://github.com/tpope/vim-surround/blob/master/doc/surround.txt#L69

If I highlight with my mouse instead of visual mode I get the expected behavior but that defeats the purpose of vim 😜

I installed VSCode Neovim extension and disabled the official vscodevim extension and I get the behavior I want now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants