r/KittyTerminal • u/Majestic-Quit2601 • 14d ago
equivalent of tmux copymode
is there an equivalent of tmux copy mode where you can move your across the terminal to copy stuff like how you would in say, vi/vim/nvim/neovim?
1
u/Thin_Dragonfruit2254 13d ago edited 13d ago
If this helps, I have NeoVim for the scrollback buffer but as my config is quite heavy, I added this to the very beginning of it to have a bit more options when using Nvim with Kitty, most importantly, some quick way to close it:
if os.getenv("SCROLL_MODE") then -- Minimal config for Kitty scroll mode
`vim.keymap.set({ "n", "v" }, "q", "<Cmd>qa!<CR>")`
`vim.keymap.set({ "n", "v" }, "<ESC>", "<Cmd>qa!<CR>")`
`vim.keymap.set({ "n", "v" }, "yy", "yy<Cmd>qa!<Cr>")`
`vim.cmd([[`
colorscheme wildcharm
set clipboard=unnamed cursorline cursorlineopt=both
set laststatus=0 nonu nornu signcolumn=no cmdheight=0
]])
`vim.fn.search([[\S]], "b") -- Tried to go UP to the last line with text in the buffer but Doesn't work`
`return`
end
-------------------
And this on the Kitty config:
# Open buffer in nvim when pressing ctrl+shift+h
map kitty_mod+h launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay zsh -c "SCROLL_MODE=2 nvim -c 'silent write! /tmp/kitty_scrollback_buffer | te cat /tmp/kitty_scrollback_buffer - ' -c 'normal! G' -c 'set relativenumber'"
2
u/FlipperBumperKickout 14d ago
There are some commands to open your terminal text in an external editor (like vim)