Skip to content

Commit

Permalink
Update README key bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
YS-L committed Nov 26, 2023
1 parent 0f23b38 commit cf401e6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
`<n>G` | Go to line `n`
Expand All @@ -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
Expand Down
10 changes: 7 additions & 3 deletions src/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
<n>G : Go to line n
Expand Down

0 comments on commit cf401e6

Please sign in to comment.