about summary refs log tree commit diff stats
path: root/res
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-09 20:45:59 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-09 20:46:52 +0100
commit4ee1a937fad792654277a1eedd35bd0c4f8389c6 (patch)
tree902128394320b4c666d5bac73df64aa89092f5d6 /res
parent4aa3e24199f0aac97d5541adcbf1ae137f7b64f0 (diff)
downloadchawan-4ee1a937fad792654277a1eedd35bd0c4f8389c6.tar.gz
pager: add marks
Default is vi-style, but w3m-style marks work as well; see
bonus/w3m.toml.
Diffstat (limited to 'res')
-rw-r--r--res/chawan.html3
-rw-r--r--res/config.toml4
2 files changed, 7 insertions, 0 deletions
diff --git a/res/chawan.html b/res/chawan.html
index c2be720c..e4937367 100644
--- a/res/chawan.html
+++ b/res/chawan.html
@@ -83,6 +83,9 @@ beginning)
 <li><kbd>0</kbd>: cursor to first cell on line
 <li><kbd>^</kbd>: cursor to first non-whitespace on line
 <li><kbd>$</kbd>: cursor to last character on line
+<li><kbd>m{char}</kbd>: set mark {char}
+<li><kbd>`{char}</kbd>, <kbd>'{char}</kbd>: jump to mark {char}, or y position
+of {char}
 <li><kbd>M-,</kbd>/<kbd>M-.</kbd>: previous/next sibling buffer
 <li><kbd>M-/</kbd>: parent buffer
 <li><kbd>{number}</kbd>, then movement: repeat movement n times<br>
diff --git a/res/config.toml b/res/config.toml
index 6be8083f..a24afeed 100644
--- a/res/config.toml
+++ b/res/config.toml
@@ -56,6 +56,7 @@ no-format-mode = ["overline"]
 emulate-overline = true
 alt-screen = "auto"
 highlight-color = "cyan"
+highlight-marks = true
 double-width-ambiguous = false
 minimum-contrast = 100
 force-clear = false
@@ -105,6 +106,9 @@ C-b = 'n => pager.pageUp(n)'
 '>' = 'n => pager.pageRight(n)'
 C-e = 'n => pager.scrollDown(n)'
 C-y = 'n => pager.scrollUp(n)'
+m = 'async () => pager.setMark(await pager.askChar("m"))'
+'`' = 'async () => pager.gotoMark(await pager.askChar("`"))'
+"'" = "async () => pager.gotoMarkY(await pager.askChar(\"'\"))"
 'zh'= 'n => pager.scrollLeft(n)'
 'zl' = 'n => pager.scrollRight(n)'
 J = 'n => pager.scrollDown(n)'