Is there a shortut (or a way to define one) in IntelliJ to switch 2 words?
Eg.
final static
Shortcut to switch to static final
?
Under the "Edit" menu look for the "String Manipulation" flyout and there should be an entry called "Swap Characters/Selections/Lines/Tokens".
Selecting both words and then using this command will present you with a dialog. Typing space into the dialog and hitting return will swap two words.
Ctrl+Shift+A will get you a shortcut to this command if you type "swap" after its dialog comes up.
If the same pattern of words occurs multiple times it would be more effective to perform a replace with Ctrl+R.
I found it under "Code" menu : CTRL + ALT + SHIFT + ← or →
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With