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
How do I copy/paste in WSL terminal? #1482
Comments
@jplew while in terminal everything u mark with the mouse is copied automatically, |
@Shorotshishir thanks for the reply. What if I don't want to use the mouse though? Is there a keyboard shortcut for it? |
Adding with this issue, while in the terminal the new clipboard functionality doesn't work properly. If the terminal is active @jplew I am also going through the source code, I do believe there is a workaround. I need to dig deeper. |
It would be nice to have some configurable copy/paste settings. I came to open an issue as I found copy/paste difficult to use. I'd really like to be able to double click a word to copy, triple click to select a line. When selecting/copying text in the old "Cmd.exe" way was tricky or buggy - sometimes it didn't paste. |
in CMD and PowerShell I'm used to selecting the text, press enter and it would be copied.. doesnt work in the terminal though ;( .. |
Does Ctrl+Insert for copy and Shift+Insert for paste work for you? |
From my point of view it's a pain each time I switch from one Terminal type
to another having to remember/learn different ways of
selecting/copying/pasting which is why I'd really push for providing a
choice.
Personally I've got used to and am very happy with (with MobaXTerm):
SELECTION:
- single-click drag to select whatever I want
double-click to select a word
triple-click to select a line
COPY: well it was already done thank you when you selected (Nice)
PASTE:
- shift-Insert
I guess good selection with auto-copy is the most important to me, then I
can adapt to Shift-Insert, Ctrl-V, "stand on my chair and shout" or
whatever ...
I think allowing this to be a profile setting would satisfy a lot of people.
…On Mon, 24 Jun 2019 at 11:07, J. Brown ***@***.***> wrote:
Does *Ctrl+Insert* for Copy and *Shift+Insert* for paste work for you?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1482?email_source=notifications&email_token=AAOLALJZRDXIOADBV4INNF3P4CFFFA5CNFSM4H2ZKHMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYMIZQI#issuecomment-504925377>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOLALLF5FNI6YIUOTJJOSDP4CFFFANCNFSM4H2ZKHMA>
.
--
Cloud Native Training in English or French
-Kubernetes, Docker
-Serverless
-Micro-services
-Python, Git
|
shift-insert works on powershell, but not on cmd and debian. missing that... |
Yea, it would be nice, the default is nifty, i miss the default select with mouse and then hitting enter for copy worked in powershell, and i think also in putty? but i don't recall. |
Just to add to my previous comment, the default right-click behavior doesn't always work...for example copying 8 characters from the terminal (select characters) and then right clicking into vscode results in my previous buffer being copied, so it's not picking up my selection? |
Yeah shift + insert for WSL is a must have |
a PR addressing this issue was just merged into master: Connect clipboard functionality to their keybindings Haven't tested yet. You'll probably have to build the exec yourself until new release makes it to the app store (looks like it was last updated four days ago: https://www.microsoft.com/en-ca/p/windows-terminal-preview/9n0dx20hk701) |
For the remaining requests, track #524. |
WTF Microsoft? I come back to Windows from macOS for a new project and this is what I find? I've been trying to copy/paste from this terminal all morning. You expect to bring devs to Windows this way? |
@csmac3144 - please refer to #524 (comment) as per #1482 (comment) |
Sorry, what's the TLDR here? Can I use the keyboard to copy and paste? As of Version: 0.7.3382.0, I still can't find a way to paste from the keyboard. #524 (comment) leads me to release v0.4.2382.0 which says:
So I have to manually configure copying 🤔? Isn't copying and pasting from the kbd table steaks? It seems like I missing something here. |
@spottedmahn You absolutely can copy/paste from/to the Windows Terminal. By default, these are bound to Ctrl+Shift+C and Ctrl+Shift+V, respectively. These bindings were chosen for two main reasons:
There are other threads that go into greater detail of the decision making here. If you're unhappy with these bindings, it's very easy to change them to something you prefer. There's even a guide here that you can follow. |
Another default way to copy paste in terminal: |
Also does not work with tmux mouse selection. |
Now we can easily copy paste by adding the keybindings in the settings:
more on guide here Edit: "globals" dictionnary is deprecated, you should add "keybindings" array out of it like so:
|
I think this should be open.
|
Thanks @PathToLife -- this is the only thing that worked for me, both in tmux, vim, vim-within-tmux. |
It boggles my mind how iPad has a better terminal than windows does. Putty was great a decade ago, and yet nothing has improved. ctrl+c/v should be the defaults for copy paste. It appears to me that windows development only happens in a gui b/c the terminals are quite unusable. |
@drewwells as has been noted in this thread, the default key binding for copy/paste is Ctrl+c/v for new users. You can continue to complain about our open-source project and make outdated claims, or you can continue using your iPad, but you’ll have to do both of them in a new discussion thread. Locking as resolved. |
In Powershell, I noticed that
ctrl+shift+v
pastes the contents of the clipboard.ctrl+shift+c
does not copy anything, it just falls back toctrl+c
which is mapped toesc
.In my Ubuntu terminal, however,
ctrl+shift+v
does not paste. It seems the only way to copy/paste is to use right-click. Is there a way to add custom keybindings to copy/paste?Poking around the source code I found CopyText and PasteText shortcuts:
However, when I tried to add them to profiles.json like this, nothing happened, those keybindings don't paste anything:
Any pointers?
The text was updated successfully, but these errors were encountered: