diff --git a/.gitignore b/.gitignore index 35a7c6e..58bef92 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ hermes *.txt test* +*.1.gz diff --git a/hermes.c b/hermes.c index 9a406ad..3888b72 100644 --- a/hermes.c +++ b/hermes.c @@ -1109,6 +1109,19 @@ void editorCommandKp(int c) { case '\033': if (E.mode == VisualMode) E.mode = CommandMode; break; + case 'r': + { + int c = editorReadKey(); + if (c) { + E.mode = InputMode; + editorMoveCursor(ARROW_RIGHT); + editorDeleteChar(); + editorInputKp(c); + E.mode = CommandMode; + editorMoveCursor(ARROW_LEFT); + } + } + break; case 'g': if (deleting) { int totlen = 0;