jwi/docs

Structural Selection

Select text by meaning, not just by character position.

Overview

Traditional text editors select characters. jwi selects meaning. Using Alt+Shift+Arrow with a double-tap gesture, you can quickly select words, sentences, paragraphs, or entire sections.

This mirrors how writers think. You don't think "characters 47-82"—you think "this sentence" or "that paragraph."

Double-Tap Gesture

The key to structural selection is the double-tap gesture. Press the same key combination twice within 300ms to expand to the next structural level.

  • First tap: Select the smallest unit (word or line)
  • Double tap: Expand to the next level (sentence or paragraph)
  • Triple tap: Expand further (line or section)
Keep tapping the same key to continue expanding. The selection remembers your current level and expands from there.

Horizontal Selection

Use Alt+Shift+Left or Alt+Shift+Right for inline text elements:

TapSelectsExample
1stWordterminal
2ndSentencejwi lives in your terminal.
3rdLineEntire line of text

Sentence boundaries are detected by punctuation: periods, exclamation marks, and question marks.

Vertical Selection

Use Alt+Shift+Up or Alt+Shift+Down for block-level elements:

TapSelectsDescription
1stLineCurrent line of text
2ndParagraphText block separated by empty lines
3rdSectionHeading + all content until next heading

Paragraph boundaries are detected by empty lines. Section boundaries use Markdown heading levels.

Structural Navigation

The same double-tap gesture works for navigation (moving the cursor without selecting). Use Alt+Arrow without Shift:

KeyFirst TapDouble Tap
Alt+RightNext wordNext sentence
Alt+LeftPrevious wordPrevious sentence

macOS

On macOS, Option+Arrow works the same way. Some terminals send Option+F and Option+B which jwi also recognizes.

Markdown Awareness

jwi automatically detects Markdown files and adjusts selection behavior:

  • Word selection includes formatting: Selecting a bold word like **important** captures the asterisks too
  • Section boundaries use headings: A section includes a heading and all content until the next heading of equal or higher level
  • Italic, underscore, and other formatting: Works with *italic*, __bold__, and _emphasis_
## Features

This is the Features section.
All of this content belongs to it.

### Subsection

Until the next ## heading appears,
everything is part of Features.

## Another Section

This starts a new section.

Use Cases

Quick sentence editing: Double-tap Alt+Shift+Right to select the current sentence, then type to replace it.

Reorganizing paragraphs: Double-tap Alt+Shift+Down to select a paragraph, cut it, navigate to a new location, and paste.

Copying sections for AI context: Triple-tap Alt+Shift+Down to select an entire section, then copy it to feed to an AI tool.

Fast navigation: Double-tap Alt+Right to jump sentence-by-sentence through your document.