Skip to content

Commit d6b6bc8

Browse files
winterkaОлег Талантов
andauthored
feat: Added minimal vim motions navigation (#151)
Co-authored-by: Олег Талантов <otalantov@astralinux.ru>
1 parent 0daa1d4 commit d6b6bc8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
| R | Reverse |
1111
| Ctrl+C | Exit |
1212
| F10 | Exit |
13-
| ↑↓ | Line Up / Down |
13+
| ↑↓ / jk| Line Up / Down |
1414
| PgUp | Page Up |
1515
| PgDown | Page Down |
1616
| Home | Navigate to Start |
17-
| End | Navigate to End |
17+
| End / G| Navigate to End |
1818
| ? | Show/Hide help |
1919

2020
> Attempting to navigate past the last line in the log will put you in follow mode.

internal/keymap/keymap.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func GetDefaultKeys() KeyMap {
3030
),
3131
Back: key.NewBinding(
3232
key.WithKeys("esc", "q"),
33-
key.WithHelp("esc", "Back"),
33+
key.WithHelp("(esc, q)", "Back"),
3434
),
3535
Open: key.NewBinding(
3636
key.WithKeys("enter"),
@@ -40,16 +40,16 @@ func GetDefaultKeys() KeyMap {
4040
key.WithKeys("right"),
4141
),
4242
Up: key.NewBinding(
43-
key.WithKeys("up"),
44-
key.WithHelp("", "Up"),
43+
key.WithKeys("up", "k"),
44+
key.WithHelp("(↑, k)", "Up"),
4545
),
4646
Reverse: key.NewBinding(
4747
key.WithKeys("r"),
4848
key.WithHelp("r", "Reverse"),
4949
),
5050
Down: key.NewBinding(
51-
key.WithKeys("down"),
52-
key.WithHelp("", "Down"),
51+
key.WithKeys("down", "j"),
52+
key.WithHelp("(↓, j)", "Down"),
5353
),
5454
PageUp: key.NewBinding(
5555
key.WithKeys("pgup"),
@@ -73,7 +73,7 @@ func GetDefaultKeys() KeyMap {
7373
),
7474
GotoBottom: key.NewBinding(
7575
key.WithKeys("end", "G"),
76-
key.WithHelp("end", "go to end"),
76+
key.WithHelp("(end, G)", "go to end"),
7777
),
7878
}
7979
}

0 commit comments

Comments
 (0)