Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ the reader and the file browser.
`w`/`b` (word), `0`/`$` (line ends), `g`/`G` (document ends), `Ctrl+d`/`Ctrl+u` (half page).
**`y`** copies and exits; `Esc` cancels.
- **Drag with the mouse** to select, release to copy. Double-click takes the word, triple-click the
line.
line. A single click on a link follows it instead (see below).
- **`c`** labels every code block on screen — press its letter to copy the block's *raw* source: no
borders, no line numbers, no syntax-highlighting escapes.
- **`Y`** copies the markdown source of the section you are reading (heading included, down to the
Expand All @@ -219,6 +219,8 @@ they select what you can see. Reach for `c` and `Y` when you want the source ins

Press `f` to label every link on screen with a letter; the popup lists each link's text next to its URL, so you can tell which is which. Press that letter to open web and mail links in your browser, or to follow a relative `.md` link or `#heading` anchor right inside ink (`[` goes back).

Clicking works too: a plain click on a link (press and release without moving) does exactly what its letter would. Dragging across a link still selects it. With `--no-mouse` ink leaves clicks to your terminal, which opens links its own way (usually Cmd- or Ctrl-click).

### Help overlay

Press `?` any time for a popup listing every active keybinding — including your own overrides.
Expand All @@ -227,6 +229,8 @@ Press `?` any time for a popup listing every active keybinding — including you

Press `t` to toggle a sidebar showing every heading in the document. Tracks your position as you scroll.

Press `o` to move into it (it opens if it was closed). `j`/`k` or the arrows move, `g`/`G` go to the first and last heading, `Ctrl+d`/`Ctrl+u` page, and `Enter` jumps there — `[` brings you back. `h`/`l` fold and unfold a section's subheadings in the sidebar, and `/` filters the list as you type (every word you type must appear, case doesn't matter). `Esc` clears the filter; `Esc` again, or `o`, goes back to the document without moving. With the mouse, click a heading to jump to it; the wheel over the sidebar scrolls the sidebar, not the page.

### 8 built-in themes

Dark, Light, Dracula, Catppuccin, Nord, Tokyo Night, Gruvbox, and Solarized. Press `T` to open the theme picker and preview each one live.
Expand Down Expand Up @@ -306,7 +310,9 @@ ink diff old.md new.md
| `v` / `V` | Select text — character-wise / line-wise (`y` copies, `Esc` cancels) |
| `c` | Copy a code block by letter |
| `Y` | Copy the current section as markdown |
| `e` | Edit the file in `$VISUAL` / `$EDITOR` (opens at the heading you are reading, reloads when you quit the editor) |
| `t` | Toggle table of contents |
| `o` | Focus the table of contents (`j`/`k` move, `Enter` jumps, `h`/`l` fold, `/` filters, `Esc` returns) |
| `T` | Theme picker (choice is saved to config) |
| `?` | Help overlay |
| `Enter` | Follow first visible link |
Expand All @@ -326,6 +332,8 @@ preset = "emacs" # default | vim | emacs
[keybindings.bindings]
# Per-action overrides, applied on top of the preset.
toggle_toc = ["ctrl-t"]
toc_focus = ["ctrl-o"]
edit = ["alt-e"]
```

The **emacs** preset binds `Ctrl+N`/`Ctrl+P` (line nav), `Ctrl+V`/`Alt+V` (page nav), `Ctrl+A`/`Ctrl+E` (home/end), `Ctrl+S` (search), `Ctrl+F`/`Ctrl+B` (next/prev heading), and `Ctrl+X Ctrl+C` (chord exit).
Expand Down
4 changes: 3 additions & 1 deletion docs/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ ink is a feature-rich terminal markdown reader built in Rust. It renders markdow
- Keyboard link opening: press f to label on-screen links, then a letter to open web/mail links or follow a relative .md link
- Help overlay: press ? for a popup of the active keybindings
- Table of contents sidebar showing heading structure, tracks scroll position
- Interactive TOC: o focuses it (opening it if closed); j/k/arrows move, g/G first/last, Ctrl+d/Ctrl+u page, Enter jumps (recorded in back/forward history), h/l fold subheadings, / filters headings as you type, Esc returns; click a heading to jump, the wheel over the sidebar scrolls it
- Navigation history with back/forward ([ ] keys or Alt+Arrow)
- Mouse wheel scrolling, plus drag-to-select (can be disabled via behavior.mouse_capture so the terminal handles clicks/selection instead)
- e opens the current local file in $VISUAL / $EDITOR (fallback vi; notepad on Windows) at the line of the heading being read (+N for vi/vim/nvim/nano/emacs/kak/micro, --goto file:N for VS Code/Codium/Cursor, file:N for subl/zed/hx), then reloads it and keeps the position; stdin and URL documents cannot be edited
- Mouse wheel scrolling, click a link to follow it (same path as f: browser for web/mail, in-app for .md and #anchor), plus drag-to-select (can be disabled via behavior.mouse_capture so the terminal handles clicks/selection instead)
- Event-driven redraw (no CPU when idle) and virtualized rendering for large documents
- Responsive to terminal resizing; shows a message instead of breaking on very small terminals

Expand Down
Loading
Loading