Skip to content
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

Copy/paste #62

Open
emersion opened this issue Feb 11, 2018 · 7 comments
Open

Copy/paste #62

emersion opened this issue Feb 11, 2018 · 7 comments

Comments

@emersion
Copy link

(I couldn't re-open #9 for some reason)

Currently it's possible to select text, but not to copy it on Linux/Windows. The Ctrl C keyboard shortcut doesn't work since it's captured by the terminal to stop the current job. The right-click menu doesn't offer a "Copy" item.

What needs to be done:

  • Add a keyboard shortcut to copy the currently selected text and paste (Ctrl Shift C/V is a popular default)
  • Add a menu item in the right-click menu to copy and paste
@jsmecham
Copy link
Owner

My next focus of work is going to be on key bindings and compatibility. See #66 where I will be tracking this work. Thanks!

@cemerick
Copy link

It looks like copy/paste/clear commands have been in the plugin from the start, just not mapped for non-Mac platforms. I added this to my keymap, and now this is a 💎 of a terminal plugin:

'terminal-view':
  'ctrl-shift-c': 'terminal:copy'
  'ctrl-shift-v': 'terminal:paste'
  'ctrl-shift-k': 'terminal:clear'

@emersion
Copy link
Author

emersion commented Mar 21, 2018

Maybe this can just be added to default keybindings?

terminal:copy doesn't work for me.

@itamarkonimbo
Copy link

didnt work for me... i get
"Uncaught TypeError: activeSession.copySelection is not a function"

@PetrKryslUCSD
Copy link

Why is it that the following does not work?
'terminal-view':
'ctrl-c': 'terminal:copy'
'ctrl-v': 'terminal:paste'

@emersion
Copy link
Author

This solution works for me now. Should really be the default for Linux and Windows.

@rzjnzk
Copy link

rzjnzk commented Dec 19, 2018

I support the idea of using ctr+shift as opposed to only ctr to avoid conflicting with terminal shortcuts, not to mention this being a convention for terminals I believe. I also support considering these as out-of-the-box bindings.

More importantly, I would like to draw attention to the issue of a context menu copy-paste functionality, which I found myself expecting to be functional when I first attempted to paste to the terminal.

Edit:

Furthermore, I support the removal of the current positioning-relevant context menu in place of right-click to paste, select-right-click to copy functionality, as id the case with many Linux terminals, and Windows PowerShell and Command Prompt. If not out-of-the-box, at least configurable,

Edit:

It appears that using the bindings provided by @cemerick, I notice that after I have done some work on my terminal, something is causing the bindings to become ineffectual. One command I definitely used some time before each instance I noticed this is tput reset && printf "\e[3J", because I use it frequently, though this may be unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants