There are several hotkeys in the Emacs editor for the undo command, in particular:
C-/ , Cx u , C-_

How can I run the redo command?

    3 answers 3

    In emacs, there is no redo command (in the sense that redo you are asking about).
    However, the desired result (cancellation of previous undo ) is easily achieved by the same undo command.

    If you did something (entered the text, deleted the words, inserted them in another place, entered the text again), decided to cancel the last few actions, i.e. did some undo (for example, typing C-/ ) and realized that you did the extra undo , then just give something that does not change the text, say, press the insole to the right ( Cf ) and again enter undo ( C-/ ).

    Now, new undo will undo actions of previous undo (i.e., in fact, this will be the redo you are looking for).

    The description in the built-in documentation is somewhat "buried" (located in the section - 20 Commands for Fixing Typos ).
    I will quote here from there:

    To begin to undo, type C-/ (or its aliases, C-_ or Cx u ) (1). This is the case.

    Consecutive repetitions of C-/ (or its aliases) undo earlier. The undo command signals an error.

    Breakout sequence of undo commands. There have been a series of changes that have been made. Therefore, it is important to retain the sequence of undoing; then type C-/ to undo the undo command.

    If you want to undo it, it’s not a matter of commands, use Mx undo-only . It is like undo .

    Further, there are various useful undo information.

    And in any case, I advise you to read all this wonderful documentation (enter Ch r and read directly in emacs in the info format).

      by analogy (global-set-key (kbd "Cz") 'undo)

      • Not entirely clear, i. on Cz hook on undo? ... Ie to make redo, do undo undo be done? - Iurii Golskyi
      • Similarly! I just do not remember what is on the 'redo, you can write anything. - zaeszaedinamomashina

      Put the package undo-tree , everything is more than clear. You can "move" through different branches of undo / redo, which is very useful.