Vim: gU/gu does not work in visual mode

Created on 14 Feb 2019  Â·  4Comments  Â·  Source: VSCodeVim/Vim

Describe the bug
As stated, these commands do not work in visual mode, visual line mode, or visual block mode. They function fine in normal mode, and ~ functions fine in visual mode. Nothing happens when the key sequence finishes.

To Reproduce
Steps to reproduce the behavior:

  1. Press v and select some text, or select it with the mouse.
  2. Press gU or gu.

Expected behavior
The text should become uppercase or lowercase, respectively.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.0.8
  • VSCode version: 1.31.1
  • OS: Windows_NT x64 10.0.15063

Most helpful comment

I agree - there's no reason to not support both, since that's how vim behaves. This is an easy fix; I'll submit a PR tonight.

All 4 comments

Hi @sobjornstad,
Kindly try after selecting a text in visual mode just press u or U instead of gu or gU
it will lowercase and uppercase the words respectively. Hence works as expected.

Kindly refer the below document for more key bindings to switch cases. :)
Refrences
https://vim.fandom.com/wiki/Switching_case_of_characters

Environment

  • VSCode version: 1.31.1
  • OS: Windows 10
  • Extension (VsCodeVim) version: 1.0.8

Thanks for the reference; I didn’t know that just u or U could be used in visual mode.

However, I still think not accepting gU and gu is incorrect behavior, as stock Vim accepts those sequences as well.

On Feb 24, 2019, at 6:33 AM, ragavkumarv notifications@github.com wrote:

Hi @sobjornstad https://github.com/sobjornstad,
Kindly try after selecting a text in visual mode just press u or U instead of gu or gU
it will lowercase and uppercase the words respectively. Hence works as expected.

Kindly refer the below document for more key bindings to switch cases. :)
Refrences
https://vim.fandom.com/wiki/Switching_case_of_characters https://vim.fandom.com/wiki/Switching_case_of_characters
Environment

VSCode version: 1.31.1
OS: Windows 10
Extension (VsCodeVim) version: 1.0.8
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/VSCodeVim/Vim/issues/3491#issuecomment-466770111, or mute the thread https://github.com/notifications/unsubscribe-auth/ACNMxlTdzng4FqFc1NM193rtEyWWA4uSks5vQoamgaJpZM4a8fxl.

Huh, I also didn't know you could use just u or U... Is there any reason you don't just support gu and gU too though? They don't appear to be taken.

I agree - there's no reason to not support both, since that's how vim behaves. This is an easy fix; I'll submit a PR tonight.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

triztian picture triztian  Â·  3Comments

Jimmy-Z picture Jimmy-Z  Â·  3Comments

edwintorok picture edwintorok  Â·  3Comments

liamdawson picture liamdawson  Â·  3Comments

waltiam picture waltiam  Â·  3Comments