atom-terminal-tab
atom-terminal-tab copied to clipboard
Copy/paste
(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
My next focus of work is going to be on key bindings and compatibility. See #66 where I will be tracking this work. Thanks!
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'
Maybe this can just be added to default keybindings?
terminal:copy doesn't work for me.
didnt work for me... i get "Uncaught TypeError: activeSession.copySelection is not a function"
Why is it that the following does not work? 'terminal-view': 'ctrl-c': 'terminal:copy' 'ctrl-v': 'terminal:paste'
This solution works for me now. Should really be the default for Linux and Windows.
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.