ojroques / vim-oscyank

A Vim plugin to copy text through SSH with OSC52
BSD 2-Clause "Simplified" License
629 stars 39 forks source link

Not working when using Neovim in tmux #46

Closed OracleMachine closed 3 weeks ago

OracleMachine commented 1 year ago

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

ojroques commented 1 year ago

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

jeremyjjbrown commented 1 year ago

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.

ojroques commented 1 year ago

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

jeremyjjbrown commented 1 year ago

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

jeremyjjbrown commented 1 year ago

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',

})
ojroques commented 1 year ago

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.

doomzhou commented 9 months ago

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

zhuzhzh commented 7 months ago

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'

epheien commented 5 months ago

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

epheien commented 5 months ago

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