From 8691699f36f374a8c01245c54a92a01932a0597a Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Wed, 1 Dec 2021 10:44:39 +0200 Subject: [PATCH] ongoing additions, changes, and fixes --- deleteme | 0 ed-text-editor-cheat-sheet.adoc | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+) delete mode 100644 deleteme diff --git a/deleteme b/deleteme deleted file mode 100644 index e69de29..0000000 diff --git a/ed-text-editor-cheat-sheet.adoc b/ed-text-editor-cheat-sheet.adoc index b9dabe1..d21cb8f 100755 --- a/ed-text-editor-cheat-sheet.adoc +++ b/ed-text-editor-cheat-sheet.adoc @@ -43,6 +43,9 @@ WARNING: Current buffer and all of its changes is discarded. |*P* |Show/hide prompt, * (asterisk) is the default. +|*H* +|Turn on/off verbose error indication mode. With this mode off, `ed` only outputs `?` for any error without additional info. + |*! _shell command(s)_* | Run the given _shell command(s)_ displaying their output without leaving the `ed`. Hitting returns to the `ed` buffer. The shell's output is not kept or redirected to the buffer in any way. @@ -55,6 +58,25 @@ WARNING: Current buffer and all of its changes is discarded. |*[_start_,_end_]p* | Print lines from _start_ to _end_ or current if not set. Sets current line to the last line printed. +|*q* +|Quit the `ed`, warns if there are unsaved changes, if repeated 2nd time, quits discarding any unsaved changes. + +|*Q* +|Quit `ed` unconditionally, discarding any unsaved changes. + +|*u* +|Undo the last change. `ed` has only one level of uno, entering `u` the second time redoes the change undone before. + +|*_n_* +|Go to the line _n_. + +|*[_starting_address_]z[_lines-to-scroll_]* +| Scroll default 24 lines down, if _lines-to-scroll_ is not given. Optionally, start scrolling not from the current line (default), but from the line number _starting_address_. Resets current line to the last line after scrolling position. + + +|*[_start_,_end_]n* +|Print _start_,_end_ lines prefixed by their line number, analog of *p* but prints line numbers as well. Use `,n` to print the whole buffer with line numbers. + |=== @@ -69,6 +91,9 @@ WARNING: Current buffer and all of its changes is discarded. |Switch from input to the command mode. The . (dot) should be entered on a new line by itself, then . +|*CTRL + C* +|Discard the changes done in the current input mode sequence, and return to the command mode. Only changes since entering last input mode are discarded, not the whole session. +