vim-oscyank icon indicating copy to clipboard operation
vim-oscyank copied to clipboard

Not working when using Neovim in tmux

Open OracleMachine opened this issue 1 year ago • 10 comments

I followed the instruction. But I still cannot yank text to clipboard if using neovim nested inside tmux.

If the neovim start with tmux. It works

OracleMachine avatar Jun 14 '23 11:06 OracleMachine

Did you set set -s set-clipboard on in your tmux config?

ojroques avatar Jun 14 '23 11:06 ojroques

i have set -s set-clipboard on and it's not working for me in neovim.

nvim -v NVIM v0.9.0 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3

tmux -V tmux 3.3a

LMK any other details to check.

jeremyjjbrown avatar Jul 07 '23 01:07 jeremyjjbrown

What is your terminal? Also, can you provide your Neovim config?

ojroques avatar Jul 07 '23 07:07 ojroques

Alactritty. My Neovim config is quite large. Let me try with a minimal config and see if I can recreate.

jeremyjjbrown avatar Jul 07 '23 14:07 jeremyjjbrown

I get the "[oscyank] N charactors copied" in the statusline wit :OSCYankVisual but nothing in my clipboard. Ctrl+Shift+c copies from tmux

  cat .config/tmux/tmux.conf
set -g set-clipboard on
  cat .config/nvim/init.lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({
        "git",
        "clone",
        "--filter=blob:none",
        "https://github.com/folke/lazy.nvim.git",
        "--branch=stable", -- latest stable release
        lazypath,
    })
end
vim.opt.rtp:prepend(lazypath)

vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct

require("lazy").setup({

    'ojroques/vim-oscyank',

})

jeremyjjbrown avatar Jul 07 '23 18:07 jeremyjjbrown

I did not manage to reproduce on Alacritty + tmux. But if you're using Neovim, I encourage you to check https://github.com/ojroques/nvim-osc52 instead.

ojroques avatar Jul 12 '23 09:07 ojroques

this: doc not applicable.
my env: iterm2 + tmux3.4 + vim(plugin installed) first step: set -g set-clipboard on not set -s set-clipboard external

doomzhou avatar Feb 22 '24 02:02 doomzhou

I use vim9 + tmux 3.4. oscyank doesn't work.

% echo $TERM
gnome-256color

set -s set-clipboard external tmux_conf_copy_to_os_clipboard=true set -as terminal-features ',gnome-256color:Ms=\E]52;%p1%s;%p2%s\007' set -s copy-command 'xsel -i'

zhuzhzh avatar Apr 19 '24 07:04 zhuzhzh

Same issue, but it's fine with v1.0.0. I'll look into the specific cause when I'm free.

epheien avatar Jun 03 '24 16:06 epheien

after I set-option -g set-clipboard on in .tmux.conf, I works

epheien avatar Jun 11 '24 15:06 epheien