Kitty is a terminal for Linux. How do I copy and paste with it. CTRL+c does not work? And there is no option on right click. Right-click also doesn't work for copy.
7 Answers
Kitty
You need to use a capital C. To copy and paste in
- Select text
- Press CTRL+SHIFT+C
- Paste with SHIFT+INSERT in any app.
There is no method to copy with the cursor.
Vim
Because things like VIM keep coming up. If you have Neovim installed (which is basically better vim). You can easily copy to your Xorg/Wayland buffer by selecting into the + buffer with "+y. This has the advantage of skipping over things that should not be copied, like hints,
- 28,578
- 45
- 164
- 290
-
Is there a way to set/get clipboard data by command in the console (e.g. shell script)? – MrCalvin May 11 '20 at 08:51
-
@MrCalvin Yes, try `xclip` – Pablo Francisco Pérez Hidalgo Apr 26 '21 at 09:21
-
1Also, TIL: `kitty +kitten clipboard` – Pablo Francisco Pérez Hidalgo Apr 26 '21 at 10:03
-
3Try to paste with `CTRL`+`SHIFT`+`V`. It works for me – eugene-bright Jun 20 '21 at 18:51
-
When I select text by dragging, it becomes immediately unselected. I have to hold Shift while dragging for some reason. – Marc Jan 10 '22 at 11:50
-
I can also paste with `CTRL`+`V` – robertspierre Mar 17 '22 at 11:30
-
If you're trying to copy from vim launched in an SSH session, selecting with mouse drag will enter visual mode - so CTRL+SHIFT+C won't have any effect, because you're selecting in vim, not kitty. To select in kitty, use SHIFT+left mouse button drag – walnut_salami Jul 02 '22 at 18:54
-
1@walnut_salami I updated with a note about neovim. – Evan Carroll Jul 02 '22 at 19:16
-
In vim, one solution is to create a shortcut to a custom command in vim to redirect the current selection to the kitty clipboard kitten. `vnoremap
y :w ! kitty +kitten clipboard – Fernando Macedo May 11 '23 at 17:41` `nnoremap y :w ! kitty +kitten clipboard `
We can also configure the feature copy on select which will copy selected text into clipboard without pressing a shortcut:
copy_on_select yes
To paste the text from clipboard, you can use the middle mouse click or set up the shortcut you want, for example:
map cmd+c copy_to_clipboard
map cmd+v paste_from_clipboard
map shift+insert paste_from_clipboard
- 606
- 12
- 29
You can configure the keyboard shortcuts.
To make Ctrl+C copy, you would put this in your kitty.conf:
map ctrl+c copy_to_clipboard
- 56,387
- 13
- 130
- 149
From the comments in Kitty's default configurations:
#:: There is also a copy_or_interrupt action that can be optionally
#:: mapped to Ctrl+c. It will copy only if there is a selection and
#:: send an interrupt otherwise. Similarly,
#:: copy_and_clear_or_interrupt will copy and clear the selection or
This does what I need:
map ctrl+c copy_and_clear_or_interrupt
map ctrl+v paste_from_clipboard
- 111
- 3
As for Kitty 0.28.1-2 now, you may use scrollback mode, like tmux's copy mode, with a default keyboard shortcut Ctrl+Shift+h. The mode will read the whole context of the current tty with a default pager less, then you can copy whatever you like, if you know how to copy text in the pager. Ctrl+Shift+g read the last shell output with the pager.
You may set scrollback_pager as your favourite pager in config too, like a powerful page which can take Neovim's advantages even.
- 21,637
- 21
- 47
- 71
- 11
- 2
Also note this very nice Kitten plug-in https://github.com/yurikhan/kitty_grab that lets you copy with the keyboard.
- 221
- 2
- 3
The accepted answer says:
You need to use a capital
C. To copy and paste in
- Select text
- Press Ctrl+Shift+C
- Paste with Shift+Insert in any app.
There is no method to copy with the cursor.
Right and wrong, there is a method for the mouse. Shift+RightMouseClick works also to paste.
- 22,130
- 27
- 68
- 117
- 1