From cf401e6b316eef0107ebb4eebec1bc36ca63b9ac Mon Sep 17 00:00:00 2001 From: Yung Siang Liau Date: Sun, 26 Nov 2023 22:33:55 +0800 Subject: [PATCH] Update README key bindings --- README.md | 9 +++++++-- src/help.rs | 10 +++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5e3c53d..0d2b77b 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,12 @@ Key | Action `hjkl` (or `← ↓ ↑→ `) | Scroll one row or column in the given direction `Ctrl + f` (or `Page Down`) | Scroll one window down `Ctrl + b` (or `Page Up`) | Scroll one window up -`Ctrl + h` (or `Ctrl + ←`) | Scroll one window left -`Ctrl + l` (or `Ctrl + →`) | Scroll one window right +`Ctrl + d` (or `d`) | Scroll half a window down +`Ctrl + u` (or `u`) | Scroll half a window up +`Ctrl + h` | Scroll one window left +`Ctrl + l` | Scroll one window right +`Ctrl + ←` | Scroll left to first column +`Ctrl + →` | Scroll right to last column `G` (or `End`) | Go to bottom `g` (or `Home`) | Go to top `G` | Go to line `n` @@ -38,6 +42,7 @@ Key | Action `TAB` | Toggle between row, column or cell selection modes `Enter` (in Cell mode) | Print the selected cell to stdout and exit `-S` | Toggle line wrapping +`H` | Display help `q` | Exit ### Optional parameters diff --git a/src/help.rs b/src/help.rs index 6ab6cca..fb3cc52 100644 --- a/src/help.rs +++ b/src/help.rs @@ -9,15 +9,19 @@ use tui::{ const HELP_CONTENT: &str = " csvlens is an interactive CSV file viewer in the command line. -You are viewing its help page. Press q to exit. +These are the key bindings. Press q to exit. # Moving hjkl (or ← ↓ ↑→ ) : Scroll one row or column in the given direction Ctrl + f (or Page Down) : Scroll one window down Ctrl + b (or Page Up) : Scroll one window up -Ctrl + h (or Ctrl + ←) : Scroll one window left -Ctrl + l (or Ctrl + →) : Scroll one window right +Ctrl + d (or d) : Scroll half a window down +Ctrl + u (or u) : Scroll half a window up +Ctrl + h : Scroll one window left +Ctrl + l : Scroll one window right +Ctrl + ← : Scroll left to first column +Ctrl + → : Scroll right to last column G (or End) : Go to bottom g (or Home) : Go to top G : Go to line n