322

What is the Intellij shortcut to convert code to upper or lower case?

Marcus Leon
  • 55,199
  • 118
  • 297
  • 429

7 Answers7

538

Ctrl + Shift + U

In the future try typing: Ctrl + Shift + A and look for any actions you like. Here: Toggle Case.

Or ⌘ Command + Shift + U if you are using Mac OSX.

Felipe
  • 16,649
  • 11
  • 68
  • 92
Tomasz Nurkiewicz
  • 334,321
  • 69
  • 703
  • 674
  • 9
    In case it helps someone who wanders in here: In Eclipse, this is CMD+SHFT+Y (lower) and CMD+SHIFT+X (upper) – gMale Aug 01 '13 at 07:53
  • 27
    I have trouble where sometimes pressing CTRL+SHIFT+U just replaces the selected text with the letter U.... sometimes it works, but usually it just does the replacing. – Trenton Jul 31 '14 at 16:15
  • 39
    @Trenton - if you're using Ubuntu CTRL+SHIFT+U by default is used for Unicode input thus you're seeing the letter u. If you don't use it you should probably unbind it (looks like it's not so easy http://askubuntu.com/questions/367646/is-it-possible-to-unbind-or-change-the-unicode-input-global-shortcut) or define a new shortcut for this action in Intellijf – Kuba Dec 11 '14 at 11:35
  • 1
    `export XMODIFIERS="" ./bin/idea.sh` solves to me, using Ubuntu. – deFreitas Jul 26 '18 at 22:46
  • 1
    @Kuba in October 2018 I can confirm that Debian does this too – sox supports the mods Oct 10 '18 at 17:32
47

According to the documentation :

Ctrl + Shift + U : Toggle case of the selected text block

Pascal MARTIN
  • 395,085
  • 80
  • 655
  • 663
30

I would highly recommend String Manipulation plugin for Intellij.

With a simple Alt + M (Option + M for Mac) you get:

enter image description here

So you can easily manipulate with strings in the following way:

enter image description here

Ivan Aracki
  • 4,861
  • 11
  • 59
  • 73
22

If you are an Ubuntu User you will notice that Ctrl + Shift + U will add an u instead of toggling the case.

The solution for me was to change the KeyMap from:

Ctrl + Shift + U --> Alt + Shift + U

You can do so with this Docs

max
  • 166
  • 13
T04435
  • 12,507
  • 5
  • 54
  • 54
  • 1
    There's an alternative way, supressing `Ctrl + Shift + U` handling by Ubuntu, so IntelliJ Idea works as usual https://superuser.com/questions/358749/how-to-disable-ctrlshiftu – edwgiz Sep 28 '22 at 09:23
4

Select the text/word/line to be modified and hitting Cntrl+Shift+U or Command+Shift+U` (MAC) works. Please look here for more detail

max
  • 166
  • 13
Shravan Ramamurthy
  • 3,896
  • 5
  • 30
  • 44
4

Please check your hot-key settings first. You could go to

File > Settings > Search for Keymap > Search for Toggle Case

and see what hot-key has been configured. See screenshot below:-

enter image description here

If not configured, create a new one for yourself.

Vinay Prajapati
  • 7,199
  • 9
  • 45
  • 86
2

Toggle case in Intellij IDE:

For Ubuntu OS use Ctrl+Shift+x or Ctrl+Shift+y

For Windows OS use Ctrl+Shift+u

thatguy
  • 21,059
  • 6
  • 30
  • 40