Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I select individual words of a camelized word in IntelliJ IDEA

What is the shortcut in IntelliJ IDEA to move across or select individual words of a camelized word? Lets say I have aLongMultiWordVariableName, I want to be able to move the cursor to each word for editing or select parts of the variable.

Eclipse has a shortcut to do this Ctrl+/ for move and Ctrl+Shift+/ for selection.

like image 254
Sathish Avatar asked Jan 04 '09 16:01

Sathish


People also ask

How do I select a word in Intellij?

You can double-click an identifier or a word in a comment or plain text to select it. For identifiers, you can opt not to select the whole CamelCased identifier, but only the capitalized word inside it where you double-click.

What is Ctrl O in Intellij?

Eclipse "Quick outline" Ctrl + O (Windows) is an equivalent Idea "File Structure" Ctrl + F12 ! Follow this answer to receive notifications.

How do I select all codes in Intellij?

Press Ctrl+Alt+Shift+J to select all case-sensitively matching words or text ranges in the document.


2 Answers

IDEA has the same keystrokes as Eclipse for camel-case words, but you have to have the CamelHumps option turned on (it's in Settings -> Editor -> General -> Smart Keys -> Use "CamelHumps" words )

like image 121
yalestar Avatar answered Oct 06 '22 10:10

yalestar


Yes, the answer of yalestar is correct. Settings > Editor > Smart keys > Use "CamelHumps" words

However, here is something that can be usefull to know: If you want to be able to select the whole word by double-click on it, unselect the "Honor 'CamelHumps' words settings when selecting on double click" in Settings > Editor.

like image 35
Romain Linsolas Avatar answered Oct 06 '22 08:10

Romain Linsolas