commit bcaa1ef7f27060bdc4fbd9986464f312e89647ef
parent 9bb9a747e2bb07511f936e835c1faafb58369ba6
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 13 Apr 2020 12:20:36 +0200
docs: explain how anchors work, and document their bindable functions
Diffstat:
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/doc/nano.texi b/doc/nano.texi
@@ -469,6 +469,7 @@ keystroke (usually @kbd{^Z}).
* Screen Layout::
* Search and Replace::
* Using the Mouse::
+* Anchors::
* Limitations::
@end menu
@@ -603,6 +604,17 @@ Shift key during those actions.
The mouse will work in the X Window System, and on the console when gpm
is running.
+@node Anchors
+@section Anchors
+
+With @kbd{M-Ins} you can place an anchor (a kind of temporary bookmark)
+at the current line. With @kbd{M-PgUp} and @kbd{M-PgDn} you can jump
+to an anchor in the backward/forward direction. This jumping wraps
+around at the top and bottom.
+
+When a line with an anchor is deleted or cut, the line where the cursor
+ends up inherits the anchor. When you close the buffer, any anchors disappear.
+
@node Limitations
@section Limitations
@@ -1357,6 +1369,15 @@ from the end of the file (and end of the line).
Moves the cursor to the bracket (brace, parenthesis, etc.) that matches
(pairs) with the one under the cursor.
+@item anchor
+Places an anchor at the current line, or removes it when already present.
+
+@item prevanchor
+Goes to the first anchor before the current line.
+
+@item nextanchor
+Goes to the first anchor after the current line.
+
@item prevbuf
Switches to editing/viewing the previous buffer when multiple buffers are open.
diff --git a/doc/nanorc.5 b/doc/nanorc.5
@@ -692,6 +692,15 @@ from the end of the file (and end of the line).
Moves the cursor to the bracket (brace, parenthesis, etc.) that matches
(pairs) with the one under the cursor.
.TP
+.B anchor
+Places an anchor at the current line, or removes it when already present.
+.TP
+.B prevanchor
+Goes to the first anchor before the current line.
+.TP
+.B nextanchor
+Goes to the first anchor after the current line.
+.TP
.B prevbuf
Switches to editing/viewing the previous buffer when multiple buffers are open.
.TP