helix: Space-p and Space-R not working inside Tmux

Discussed in https://github.com/helix-editor/helix/discussions/8470

<div type='discussions-op-text'>

Originally posted by yusuphgammut October 6, 2023 Hello.

I recently updated my operating system to macOs Ventura and since then the Space-p and Space-R keymaps are not working inside Tmux. However, Ctrl-v works as expected. Before that they worked ok. Any idea on how to address this?

Alacritty version: alacritty 0.13.0-dev (e35e5ad). Tmux version: tmux 3.3a. Helix version: helix 23.05 (072e1eae).

Outside Tmux, hx --health returns this:

Clipboard provider: pbpaste+pbcopy
System clipboard provider: pbpaste+pbcopy

Inside Tmux, hx --health returns this:

Clipboard provider: tmux
System clipboard provider: tmux

And tmux show -s set-clipboard returns this:

set-clipboard external
</div>

Seems to have started after https://github.com/helix-editor/helix/pull/8182 because this prioritizes the tmux codepath over pbcopy/pbpaste. It seems to happen on iterm2 / default system terminal and the OSC 52 yank isn’t forwarded to the system clipboard.

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Comments: 22 (19 by maintainers)

Most upvoted comments

Allowing user config is something we should support but it wasn’t needed until now since it’s only necessary if there was a bug like this.

A solution for this specific case would be to always use the OSC 52 provider (it’s currently only set as a fallback) in combination with any provider we detect. Then we wouldn’t even need this tmux specific workaround with load-buffer

Thanks for your time @xJonathanLEI – I’m pretty sure Terminal.app doesn’t support OSC 52, I’ve investigated these issues in the past.

EDIT: you beat me to it

Also using Asahi (NixOS) a fair amount, dual booting 😃

I might just try to figure out how to define a custom command in helix and use that as needed. Having helix copy and paste to tmux instead of the system clipboard isn’t bad, just not what I’m used to!