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 prefix is ctrl + b.)