about summary refs log tree commit diff stats
path: root/res
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-10-01 02:42:57 +0200
committerbptato <nincsnevem662@gmail.com>2023-10-01 02:42:57 +0200
commit6c10c1b14b5fec2c0c3ba2d2bd22d3d23265377e (patch)
tree11227039c18a09e31840bb4fd3e436ae70b16226 /res
parent03fc72abc4f99b3ee46591d8247a27c642e0b51a (diff)
downloadchawan-6c10c1b14b5fec2c0c3ba2d2bd22d3d23265377e.tar.gz
Improve vi/m compat in scrolling
Diffstat (limited to 'res')
-rw-r--r--res/chawan.html4
-rw-r--r--res/config.toml12
2 files changed, 13 insertions, 3 deletions
diff --git a/res/chawan.html b/res/chawan.html
index 81f9bbea..b73a4347 100644
--- a/res/chawan.html
+++ b/res/chawan.html
@@ -46,7 +46,9 @@ the meta key may be called Alt or Escape.)
 <li><b>C-z</b>: suspend the browser
 <li><b>M-C-c</b>: cancel loading
 <li><b>H</b>, <b>M</b>, <b>L</b>: move cursor to the Highest/Middle/Lowest rows
-<li><b>z</b>: center on current column
+<li><b>zz, z.</b>: center on current line (and move to beginning)
+<li><b>zt, z-</b>: center on current line (and move to beginning)
+<li><b>zb, zC-m</b>: center on current line (and move to beginning)
 <li><b>w</b>, <b>b</b>: move cursor to next/previous word
 <li><b>v</b>: toggle page source view
 <li><b>0</b>: cursor to first cell on line
diff --git a/res/config.toml b/res/config.toml
index c69d8b66..fed898e9 100644
--- a/res/config.toml
+++ b/res/config.toml
@@ -113,10 +113,18 @@ U = 'pager.reload()'
 r = 'pager.redraw()'
 R = 'pager.reshape()'
 M-C-c = 'pager.cancel()'
-g = 'pager.cursorFirstLine()'
+gg = 'pager.cursorFirstLine()'
 G = 'n => n ? pager.gotoLine(n) : pager.cursorLastLine()'
 M-g = 'pager.gotoLine()'
-z = 'pager.centerLine()'
+'z.' = 'n => pager.centerLineBegin(n)'
+'zC-m' = 'n => pager.raisePageBegin(n)'
+'zC-j' = 'n => pager.raisePageBegin(n)'
+'z-' = 'n => pager.lowerPageBegin(n)'
+zz = 'n => pager.centerLine(n)'
+'zt' = 'n => pager.raisePage(n)'
+'zb' = 'n => pager.lowerPage(n)'
+'z+' = 'n => pager.nextPageBegin(n)'
+'z^' = 'n => pager.previousPageBegin(n)'
 C-g = 'pager.lineInfo()'
 v = 'pager.toggleSource()'
 D = 'pager.discardBuffer()'