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.
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.
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 sthens, typeneedle, pressEnter - Use
nandpto 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 -laor a failing build - Press
Ctrl sthene - Your
$EDITORopens 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.