It is simple and default: ( CTRL + Z ) This is for undo. Just press ( CTRL + SHIFT + Z ) for redo.
Redo an action To redo something you've undone, press Ctrl+Y or F4. (If F4 doesn't seem to work, you may need to press the F-Lock key or Fn Key, then F4). If you prefer to use the mouse, click Redo on the Quick Access toolbar. (The Redo button only appears after you've undone an action.)
To reverse your last Undo, press CTRL+Y. You can reverse more than one action that has been undone. You can use Redo command only after Undo command. To perform a function on all the content in the text editor, you need to select it all.
To undo an action, do one of the following:On the main menu, choose Edit | Undo. Press Ctrl+Z .
Open Settings
(press CTRL+ALT+S)
Click Keymap
on the left list.
There is a combobox that contains keymaps. Select one of them (default means IntelliJ of course. We can't change any of pre-defined keymap however we can copy, edit and then use the edited one. So) we should copy "default" to change only redo mapping.
Give a new name to your copied keymap.
Right click on:
Main Menu -> Edit -> Redo
to click "Add Keyboard Shortcut"
Press CTRL+Y
Click OK
Click "Remove" to "the shortcut is already assigned to other actions. Do you want to remove other assignments?"
If you want to use any "remove line" shortcut also, then go to delete line shortcut and give to it any other shortcut (like 5th step)
Click OK to close settings window.
Change the keymap setting to the Visual Studio, Eclipse, or NetBeans preset.
The settings window can be found under File > Settings
. CTRL+ALT+S should work if the shortcut hasn't been changed. In the settings window you should find Keymap
under the Appearance & Behavior
settings list.
You can configure each editor command to a key combo that you like (as @ismail yavuz mentioned) such as for Redo
to CTRL+Y or you can just change the Keymap
setting to an editor that you are used to. This might be best if you are in the process of switching to IntelliJ as it is probably the path of least resistance. The default settings for the Visual Studio, Eclipse, and NetBeans keymaps all map Redo
to CTRL+Y.
The Principle of least astonishment is strangely violated for Windows users but at least shortcuts is customizable. Because of this command being so contrary to the Windows experience I decided it wasn't worth learning the IntelliJ keyboard when anywhere you're working at you need to, you can quickly change. There are almost no drawbacks to not learning the IntelliJ. Remember that in the keymap menu you can search for a command in the search box or click on the magnifying glass on the right to search by key combo.
Of course neither answer is wrong. Chose your preference.
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