Whetstone.
Scrollback and searchSearch, and edit scrollback in your editor
Module 5 · Lesson 211 min

Search, and edit scrollback in your editor

Search lives inside Scroll mode. From Scroll mode, s starts a search; you type your needle, press Enter, and then jump between matches. You can toggle case sensitivity, wrapping, and whole-word matching while you search.

Searching (from Scroll mode)
CtrlthensEnter Scroll mode
sStart a search (type the needle, then Enter)
nNext match (down)
pPrevious match (up)
cToggle case sensitivity
wToggle wrap-around
oToggle whole-word matching

Now the feature that pays for the whole tool. From Scroll mode, e dumps the entire scrollback buffer into your $EDITOR as a file. Suddenly all that terminal history is a real buffer: search it with your editor’s search, copy blocks, save it, pipe it. No more fighting terminal selection to grab a stack trace.

Edit scrollback
CtrlthensEnter Scroll mode
eOpen the pane's scrollback in $EDITOR
Practice

Try it yourself

Do

Search your history

Find a needle in the scrollback.

  • Produce output containing a known word, e.g. echo needle; seq 1 200
  • Press Ctrl s then s, type needle, press Enter
  • Use n and p to move between matches
Done whenZellij jumped your view to the matching line(s) as you searched.
Do

Dump scrollback to your editor

Send a pane's history straight into your editor.

  • Run a command with output worth keeping, like ls -la or a failing build
  • Press Ctrl s then e
  • Your $EDITOR opens with the scrollback as its contents
  • Search or copy inside the editor, then quit back to the pane
Done whenYour editor opened containing the pane's scrollback, and closing it returned you to the terminal.
Recall

Recall the killer keys

This one's worth having cold.

Which keys open the current pane's scrollback in your editor?

Reveal answer

Ctrl s (Scroll mode) then e.

Sign in to track your progress →