Fix missing keybindings in MANUAL.rst

This commit is contained in:
CrystalSplitter 2024-01-15 12:45:43 -08:00 committed by Jordan R AW
parent d09a6d125b
commit 7976595617
3 changed files with 34 additions and 31 deletions

View File

@ -99,7 +99,7 @@ At any point in time, you can revert back to the Source Viewer panel with the
panel. panel.
On top of each panel is a label where the navigation key combination is located. On top of each panel is a label where the navigation key combination is located.
For example, the key combination above the Modules panel displays `[M]`. For example, the key combination above the Modules panel displays ``[M]``.
Pressing this key combination will move the focus to that panel. Pressing this key combination will move the focus to that panel.
----------- -----------
@ -116,6 +116,7 @@ Source Viewer
- ``?``: Display help inside GHCiTUI. - ``?``: Display help inside GHCiTUI.
- ``Ctrl+x``: Toggle between the Source Viewer and the Live Interpreter - ``Ctrl+x``: Toggle between the Source Viewer and the Live Interpreter
panels. panels.
- ``M``: Switch to the module panel.
- ``<Esc>``, ``q``: Quit. - ``<Esc>``, ``q``: Quit.
- ``<Up>``, ``k``: Move the cursor up. (``j`` and ``k`` from Vim keybinds) - ``<Up>``, ``k``: Move the cursor up. (``j`` and ``k`` from Vim keybinds)
- ``<Down>``, ``j``: Move the cursor down. (``j`` and ``k`` from Vim keybinds). - ``<Down>``, ``j``: Move the cursor down. (``j`` and ``k`` from Vim keybinds).
@ -153,7 +154,7 @@ Modules
- ``?``: Display help inside GHCiTUI. - ``?``: Display help inside GHCiTUI.
- ``Ctrl+x``: Switch to the Live Interpreter. - ``Ctrl+x``: Switch to the Live Interpreter.
- ``<Esc>``: Switch to Source Viewer. - ``<Esc>``, ``C``: Switch to Source Viewer.
- ``<Up>``, ``k``: Move the module selection up. - ``<Up>``, ``k``: Move the module selection up.
- ``<Down>``, ``j``: Move the module selection down. - ``<Down>``, ``j``: Move the module selection down.
- ``+``, ``-``: Increase/decrease the info panel size. - ``+``, ``-``: Increase/decrease the info panel size.

View File

@ -19,8 +19,8 @@ CLI SYNOPSIS
STARTING AND STOPPING STARTING AND STOPPING
Starting Starting
GHCiTUI runs a REPL in the current directory by default. By default, it GHCiTUI runs a REPL in the current directory by default. By default,
launches cabal repl. it launches cabal repl.
$ cd your/cabal/project/root/directory $ cd your/cabal/project/root/directory
$ ghcitui $ ghcitui
@ -30,14 +30,14 @@ STARTING AND STOPPING
$ ghcitui -C some/other/directory $ ghcitui -C some/other/directory
Stopping Stopping
To quit, press <ESC> or q while in the code viewport panel to quit. To quit, press <ESC> or q while in the code viewport panel to quit.
While not in the code viewport panel, you may press <ESC> to get to the While not in the code viewport panel, you may press <ESC> to get to
viewport panel. the viewport panel.
LAYOUT LAYOUT
GHCiTUI is an in-terminal viewer for GHCi. The TUI is broken up into GHCiTUI is an in-terminal viewer for GHCi. The TUI is broken up into
three primary panels, with some additional auxiliary panels for special three primary panels, with some additional auxiliary panels for spe
use cases: cial use cases:
┌──────────────────┬──────┐ ┌──────────────────┬──────┐
│ │ Info │ │ │ Info │
@ -51,37 +51,39 @@ LAYOUT
│ │ │ │ │ │
└──────────────────┴──────┘ └──────────────────┴──────┘
Source Viewer: This panel shows source code. You can step, continue, Source Viewer: This panel shows source code. You can step, continue,
and toggle breakpoints among other operations in this panel. and toggle breakpoints among other operations in this panel.
Live Interpreter: This panel shows the GHCi/REPL passthrough. You can Live Interpreter: This panel shows the GHCi/REPL passthrough. You can
enter expressions and GHCi commands here like you would normally, with enter expressions and GHCi commands here like you would normally, with
some additional keybindings. some additional keybindings.
Info: This panel displays miscellaneous info about whatever is cur Info: This panel displays miscellaneous info about whatever is cur
rently running. For example, it can display the current bindings, rently running. For example, it can display the current bindings,
loaded modules, and the current program trace. loaded modules, and the current program trace.
NAVIGATION NAVIGATION
At any point in time, you can revert back to the Source Viewer panel At any point in time, you can revert back to the Source Viewer panel
with the <Esc> key, and you can always quit by hitting <Esc> in the with the <Esc> key, and you can always quit by hitting <Esc> in the
Source Viewer panel. Source Viewer panel.
On top of each panel is a label where the navigation key combination is On top of each panel is a label where the navigation key combination
located. For example, the key combination above the Modules panel dis is located. For example, the key combination above the Modules panel
plays [M]. Pressing this key combination will move the focus to that displays [M]. Pressing this key combination will move the focus to
panel. that panel.
KEYBINDINGS KEYBINDINGS
At this time, keybindings are hardcoded. This will hopefully change in At this time, keybindings are hardcoded. This will hopefully change in
the future with a keybinding configuration file. the future with a keybinding configuration file.
Source Viewer Source Viewer
• ?: Display help inside GHCiTUI. • ?: Display help inside GHCiTUI.
• Ctrl+x: Toggle between the Source Viewer and the Live Interpreter • Ctrl+x: Toggle between the Source Viewer and the Live Interpreter
panels. panels.
• M: Switch to the module panel.
• <Esc>, q: Quit. • <Esc>, q: Quit.
• <Up>, k: Move the cursor up. (j and k from Vim keybinds) • <Up>, k: Move the cursor up. (j and k from Vim keybinds)
@ -94,19 +96,19 @@ KEYBINDINGS
• +, -: Increase/decrease the left panel sizes. • +, -: Increase/decrease the left panel sizes.
• b: Toggle breakpoint at current line. Not every line in a source file • b: Toggle breakpoint at current line. Not every line in a source
can have a breakpoint placed on it. file can have a breakpoint placed on it.
• s: Advance execution by one step. Same as the :step in GHCi. • s: Advance execution by one step. Same as the :step in GHCi.
• c: Advance execution until next breakpoint. Same as :continue in • c: Advance execution until next breakpoint. Same as :continue in
GHCi. GHCi.
• t: Advance execution until next breakpoint under tracing. Same as • t: Advance execution until next breakpoint under tracing. Same as
:trace in GHCi. :trace in GHCi.
Live Interpreter (REPL) Live Interpreter (REPL)
• Ctrl+x: Toggle between the Source Viewer and the Live Interpreter • Ctrl+x: Toggle between the Source Viewer and the Live Interpreter
panels. panels.
• <Esc>: Switch to Source Viewer. • <Esc>: Switch to Source Viewer.
@ -132,7 +134,7 @@ KEYBINDINGS
• Ctrl+x: Switch to the Live Interpreter. • Ctrl+x: Switch to the Live Interpreter.
• <Esc>: Switch to Source Viewer. • <Esc>, C: Switch to Source Viewer.
• <Up>, k: Move the module selection up. • <Up>, k: Move the module selection up.
@ -142,4 +144,4 @@ KEYBINDINGS
• <Enter>, o: Open the selected module. • <Enter>, o: Open the selected module.
GHCITUI MANUAL() GHCITUI MANUAL()

View File

@ -4,4 +4,4 @@ GENDIR="gen"
mkdir -p "${GENDIR}" mkdir -p "${GENDIR}"
TMPFILE="$(mktemp)" TMPFILE="$(mktemp)"
rst2man MANUAL.rst > "${TMPFILE}" rst2man MANUAL.rst > "${TMPFILE}"
man "${TMPFILE}" | sed -e '1,5d' > ${GENDIR}/MANUAL.txt MANWIDTH=79 man "${TMPFILE}" | sed -e '1,5d' > ${GENDIR}/MANUAL.txt