-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to select/copy all the text in the session #1469
Comments
I should add this to the #4993 scenario. |
@carlos-zamora what is the plan for this feature? Looks like an important feature. |
For what its worth and to whomever finds this useful, if you zoom out really far with ctrl + scroll wheel highlighting the complete buffer is much less painful even for relatively long histories. Not ideal of course, workable. |
Make sure one can choose between plain text and formatted text e.g. with colors. MobaXterm supports saving as RTF, preserving formatting. |
We already support RTF and HTML copy, @sba923 :) |
Typing my comment, on my phone, I kinda remembered reading about this somewhere... 😝 I promise I will check out the docs first thing in the morning 😜 |
I know, but you can't choose dynamically. You have to define this in the settings. So it's either "always formatted" or "always plain text." Being able to choose between formatted copy or unformatted copy e.g. by using two different key bindings would be nice. Or maybe the choice should be at paste time, not at copy time. (I know, one day Win+V will allow pasting the plain-text version of whatever's on the clipboard. But this is not yet for corporate systems running non-Insider Windows 10 builds 😉). |
That's completely up to the app reading the clipboard. Can't do anything about that.
You mean like... { "command": { "action": "copy", "copyFormatting": "rtf" }, "keys": "ctrl+shift+r" },
{ "command": { "action": "copy", "copyFormatting": "html" }, "keys": "ctrl+shift+h" },
{ "command": { "action": "copy", "copyFormatting": ["html", "rtf"] }, "keys": "ctrl+win+alt+shift+h" }, ? From the docs for the copy action. |
I know. It's too bad too many apps don't provide a way to choose between plain-text paste and formatted paste. I paste tons of stuff into Teams, from various sources like VScode and Windows Terminal, and I often don't get what I'd expect. My current workaround is to first rewrite the clipboard as plain-text-only with some one-liner, such as this running in a WSL2 tab in Windows Terminal 😉
(this also tackles a Teams issue with the lack of line-wrapping but that's another issue altogether)
Exactly. [blushing mode on] My bad for not RTFM. [blushing mode off]. I'll try defining a "copy as plain text" keybinding and see whether my muscle memory can be trained to using that. |
1 similar comment
I know. It's too bad too many apps don't provide a way to choose between plain-text paste and formatted paste. I paste tons of stuff into Teams, from various sources like VScode and Windows Terminal, and I often don't get what I'd expect. My current workaround is to first rewrite the clipboard as plain-text-only with some one-liner, such as this running in a WSL2 tab in Windows Terminal 😉
(this also tackles a Teams issue with the lack of line-wrapping but that's another issue altogether)
Exactly. [blushing mode on] My bad for not RTFM. [blushing mode off]. I'll try defining a "copy as plain text" keybinding and see whether my muscle memory can be trained to using that. |
Leaving the text format aside, what is the status of being able to copy all text to the clipboard? Since we just got the ability to change the language to English, I can now actually read the menu options and in the "Command Palette" window there is nothing that is related to selecting text. Ctrl+A just inserts |
https://docs.microsoft.com/en-us/windows/terminal/search I second request to support text selection and copying though. |
Unless you want wildcard search, regular expression search, find all, count, match whole word, find and replace, mark line and a million other things you'll never have inside a terminal... One common scenario is using a command that dumps a huge JSON on the screen and you want to copy it over for further processing and formatting (yes, you can use |
I have found a workaround to select all text:
|
Is it really so hard to make a keybind for atleast "Select all current input" ? 😢 |
Oh, no this should be super easy. This should be marked "Easy Starter", that's my bad. Alas, we haven't had time to get around to it, but it shouldn't be too hard to:
If anyone is interested, feel free to take a stab! I'll relabel this appropriately terminal/doc/specs/Keyboard-Selection.md Lines 120 to 130 in d0d42c4
|
FYI |
I probably have a silly workflow, but I just wanted to echo that for me "Select All" (Ctrl+A) and "Copy" (Ctrl+C) console output would be a pretty sweet feature to have. |
Dear devs, could you please implement this? As a blind developer I'm not able to use the mouse at all and, as it seems, there is no way of selecting text in Windows Terminal using the keyboard only. Otherwise, a great app, thank you. |
Adds the `selectAll` action which can be used to select all text in the buffer (regardless of whether a selection is present). ## References #3663 - Mark Mode #4993 - [Scenario] Keyboard selection ## PR Checklist * [x] Closes #1469 * [x] Tests added/passed ## Detailed Description of the Pull Request / Additional comments I've made it such that selecting the "entire buffer" really just selects up to the mutable viewport. This seems like a nice QOL improvement since there's generally nothing past that. When the user selects all, the viewport does not move. This is consistent with CMD behavior and is intended to allow the user to not lose context when selecting everything. A minor change had to be made to the DxRenderer because this uncovered an underflow issue. Basically, the selection rects were handed to the DxEngine relative to the viewport (which means that some had a negative y-value). At some point, those rects were stored into `size_t`s, resulting in an underflow issue. This caused the renderer to behave strangely when rendering the selection. Generally, these kinds of issues weren't really noticed because selection would always modify a portion of the viewport. Funny enough, in a way, this satisfies the "mark mode" scenario because the user now has a way to initiate a selection using only the keyboard. Though this isn't ideal, just a fun thing to point out (that's why I'm not closing the mark mode issue). ## Validation Steps Performed - Verified using DxEngine and AtlasEngine - select all --> keyboard selection --> start moving the top-left endpoint (and scroll to there) - select all --> do not scroll automatically
🎉This issue was addressed in #13045, which has now been successfully released as Handy links: |
Sorry but this is super unhelpful, it selects all the text in the prompt including the beginning
How about the ability to just select the current writable buffer?? |
Summary of the new feature/enhancement
Sometimes there are situations when you need to select/copy all the text in the session.
Proposed technical implementation details (optional)
Select All Text
.May intersect with #715.
The text was updated successfully, but these errors were encountered: