For those looking for a simple answer:
- Use prefix + :, then type in
capture-pane -S -3000+ Return. (Replace-3000with however many lines you'd like to save, or with-for all lines.) This copies those lines into a buffer. - Then, to save the buffer to a file, just use prefix + : again, and type in
save-buffer filename.txt+ return. (by default it'll save the file in ~/)
(By default Prefix is Ctrl+B.)