Code Monkey home page Code Monkey logo

Comments (5)

IamGianluca avatar IamGianluca commented on June 24, 2024 2

Upgrading mosh to 1.4.0 on both client and server, upgrading tmux to 3.3a, plus the changes below on tmux.conf fixed the issue for me.

set -s set-clipboard on
set-option -ag terminal-overrides ",xterm-256color:Ms=\\E]52;c;%p2%s\\7"

I can't describe the joy of copying the above from my remote config file with yy and pasting it on my local browser with Cmd+v 😄

FYI, it works even without using this plugin.

EDIT: I've also set vim.opt.clipboard = "unnamedplus" in the neovim config.

from nvim-osc52.

ojroques avatar ojroques commented on June 24, 2024

This sounds like mosh does not support OSC52 indeed. This issue may be related: mobile-shell/mosh#637. Try using this PR maybe: mobile-shell/mosh#1054

from nvim-osc52.

kmac avatar kmac commented on June 24, 2024

As another data point: I am using mosh and it works for the scope of this plugin.

mosh --version
mosh 1.4.0 [build mosh-1.4.0-dirty]

Working with both Windows Terminal (client) and linux clients. The backend is linux. I did have to force my server-side to the most recent mosh version to get it working.

Note: I'm also using tmux on the far end but I don't think that's related. I'm also using the tmux_passthrough setting which just merged (thanks ojroques). I can't see how that would be related to mosh though.

There is an edge case with tmux and the copy-pipe command that I can't get to work (while copy-pipe-and-cancel does), but that's not within nvim.

from nvim-osc52.

kmac avatar kmac commented on June 24, 2024

@IamGianluca I found the 'yank' script from https://sunaku.github.io/tmux-yank-osc52.html to be helpful when testing out osc52 on the remote. You can use it without tmux. It's a simple script to yank text via osc52. You could try it outside of nvim to make sure that you've got basic functionality working over mosh before moving into testing this plugin inside nvim.

from nvim-osc52.

kmac avatar kmac commented on June 24, 2024

@IamGianluca I may have to revisit using unamedplus in my config... thanks - it seems like it will be more convenient.

Btw, I think the recent commit for 'tmux_passthrough' support should get rid of the need for that terminal overrides option. It uses a control code to tell tmux to pass the next command through to the terminal.

I'd be curious if the following changes work for you:

Remove your terminal-overrides, but set 'allow-passthrough on'

# set -s set-clipboard on  # (is no longer required - default 'external' is sufficient)
allow-passthrough on

Then set 'tmux_passthrough = true' in your plugin settings:

require('osc52').setup {
  tmux_passthrough = true, 
}

Or not, if you don't want to bother :-) I'm mainly curious, since I found the allow-passthrough in tmux seemed to solve a lot of my problems.

from nvim-osc52.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.