I've just moved from Eclipse to Android Studio and am finding really weird behaviour when I try to do Ctrl+Z / Ctrl+Y to undo/redo code changes.
It hard to describe what happens exactly, but the end result is that I usually end up just losing my code and having to type it back in from memory...
The 'undo' and 'redo' buttons in the IDE do seem to work fine, so maybe something is wrong with my shortcut keys (which would be surprising as I should just have a standard installation / setup).
Can anyone advise what to do, so Ctrl and Z / Ctrl+Y will work in the expected manner.
To undo an action, press Ctrl + Z. To redo an undone action, press Ctrl + Y. The Undo and Redo features let you remove or repeat single or multiple typing actions, but all actions must be undone or redone in the order you did or undid them – you can't skip actions.
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.
A shortcut key of a "redo" action is now Ctrl+Y in all Microsoft Office products. However, a lot of other programs like Matlab, Adobe Illustrator, and even old versions of Microsoft Office had "redo" action shortcut key as Ctrl+Shift+Z.
Bookmark this question. Show activity on this post. The default IntelliJ / Android Studio "Redo" action shortcut is CTRL + Shift + Z and this is a common problem for Windows users. A bigger problem is CTRL + Y is mapped to the "Delete line" action - and this causes the undo stack to be lost.
With the help of this answer, I have worked it out...
Settings
(Ctrl+Alt + S)Redo
in the search box.Redo
resultAdd Keyboard Shortcut
OK
OK
To undo an action, do one of the following:
On the Main
Menu, choose Edit | Undo
. Press Ctrl+Z
To redo an action, do one of the following:
On the Main
menu, choose Edit | Redo
. Press Ctrl+Shift+Z
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