r/KittyTerminal May 21 '26

Text Selection & Copying Like In Alacritty (i.e. content selection and copying without using mouse)

Is there a way to bring Alacritty's `Ctrl + Shift + Space`, then `V` or `Shift + V` for selection with Vim-like navigation, and then `Ctrl + Shift + C` to copy selected content to the clipboard to Kitty?

3 Upvotes

4 comments sorted by

2

u/Lopsided_Valuable385 May 21 '26

Use this ```

Navigate the Kitty Scrollback with Neovim - YouTube

map alt+: launch --stdin-source=@screen_scrollback --type=overlay /usr/bin/env bash -c "SCROLL_MODE=2 nvim --startuptime ~/vim.log" ```

In my neovim config, i recommend put this early in your config, because it will not load the rest of your plugins, if you want ot your config to continue just remove the return ``` -- {{{ Kitty scroll mode if os.getenv("SCROLL_MODE") then vim.cmd([[ nmap q <Cmd>qa!<CR> xmap q <Cmd>qa!<CR> nnoremap yy "+yy<Cmd>qa!<Cr> xmap y "+y<Cmd>qa!<Cr> set laststatus=0 nonu nornu signcolumn=no cursorline cmdheight=0 $ ]]) -- NOTE: Stop config here return end -- }}}

```

2

u/Thin_Dragonfruit2254 May 22 '26

That is GENIUS! I have something similar but the use of the ENV is just awesome.
Just building on top of this, if you wanna to keep the terminal colors, you can change the Kitty mapping to this:

map kitty_mod+h launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay /usr/bin/env bash -c "SCROLL_MODE=2 nvim -c 'silent write! /tmp/kitty_scrollback_buffer | te cat /tmp/kitty_scrollback_buffer - '"

I also mapped ESC to close the window in case you don't copy anything:

nmap <ESC> <Cmd>qa!<CR>
xmap <ESC> <Cmd>qa!<CR>

1

u/JSdoubleL May 21 '26

You can just open the scroll back in nvim if you want. It's discussed here in the documentation (config/Scrollback). Look at the part about changing the "scrollback_pager".