Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working when using Neovim in tmux #46

Open
OracleMachine opened this issue Jun 14, 2023 · 10 comments
Open

Not working when using Neovim in tmux #46

OracleMachine opened this issue Jun 14, 2023 · 10 comments

Comments

@OracleMachine
Copy link

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 OracleMachine changed the title Not working when use Neovim in tmux Not working when using Neovim in tmux Jun 14, 2023
@ojroques
Copy link
Owner

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

@jeremyjjbrown
Copy link

jeremyjjbrown commented Jul 7, 2023

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
Copy link
Owner

ojroques commented Jul 7, 2023

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

@jeremyjjbrown
Copy link

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

@jeremyjjbrown
Copy link

jeremyjjbrown commented Jul 7, 2023

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
Copy link
Owner

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
Copy link

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
Copy link

zhuzhzh commented Apr 19, 2024

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
Copy link

epheien commented Jun 3, 2024

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

@epheien
Copy link

epheien commented Jun 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants