Repository: terminal
Issue: ability to pipe scrollback buffer to a pager or terminal editor like kitty
Labels: Issue-Feature,Area-Extensibility,Product-Terminal

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

### Ability to pipe scrollback buffer to a pager or terminal editor

[This is basically what kitty does with `ctrl-shift-h`](https://sw.kovidgoyal.net/kitty/#the-scrollback-buffer). By default it just uses less, but you can use any pager or terminal editor just as long as it understands ANSI escape codes. eg `scrollback_pager nvim -c 'set ft=man' -`.

I believe this is a more powerful way to **mark, select, copy** than introducing mark mode (#5804) and selection spec (#2840). Because it leverages all the features a terminal editor has as oppose to have arbitrary bindings that only exist in Microsoft Terminal.

Don't get me wrong, while I know I just said that this is more powerful, I'm not saying this could replace, but rather be a powerful complement to those PRs.

I guess the right approach is just dumping the whole buffer to stdin and piping it to whatever command we set in JSON configuration.

With  Microsoft Terminal already supporting splits and tabs, this could totally replace `tmux` for me. And I do think this is a superior approach since terminal multiplexers tend to just duplicate all the escape sequences you type, which is wasteful. Having the Terminal handle your splits, and scrollback buffer is what most people use terminal multiplexer is for.

Some might say, "_but what about sessions_?". Tmux is an odd program since it is both a session manager and a terminal multiplexer. This solves the latter by completing the trifecta - **splits, tabs, scrollback buffer**.

This should [complement the history size configuration](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings#history-size). Since having a large amount of scrollback buffer could lead to slowdowns. But using vim for years, I never found a  file that it couldn't handle, (I'm talking about opening gigabytes worth of log files).

### Proposed technical implementation details (optional)
1. Default binding: `ctrl-shift-h`
2. Pipes the whole buffer to stdin to a default program like `less`
2a. (optional) We could remove all the ANSI Escape codes by default, that way you just pipe it directly to your terminal like `vim -M +MANPAGER -`, I have to use `sed` to remove them when using it in kitty.
3. Ability to change the scrollback pager program via `scrollbackPager` in JSON Config.
4. closing the scrollback pager would bring you back to where you invoked to command