micro-editor / micro-editor/micro

Differing copy-paste mechanics between tmux and non-tmux

Open
#3,317 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

Description of the problem or steps to reproduce

Could someone help me understand which of these is the expected behavior?

When I ssh into my workstation, I can copy something from outside micro and paste it within micro using Cmd+V, Ctrl+V, and Ctrl+Shift+V. However when I try to copy something from within micro with Ctrl+C (which shows the "Copied selection" message at the bottom), pasting results in the text previously copied from outside micro. Ctrl+Shift+C and Cmd+C don't work either (they don't even show the "Copied selection" message).

So in summary

non-tmux

  • Ctrl+V: pastes last thing copied from outside micro
  • Cmd+V: pastes last thing copied from outside micro
  • Ctrl+Shift+V: pastes last thing copied from outside micro
  • Ctrl+C: shows "Copied selection" message but can't paste what was just copied
  • Cmd+C: no "Copied selection" message
  • Ctrl+Shift+C: no "Copied selection" message

When I ssh into my workstation and enter a tmux session, I can copy and paste within the file using Ctrl+C and Ctrl+V. Cmd+V and Ctrl+Shift+V paste whatever the previous non-micro thing I copied was. However I cannot copy something from within micro and paste the contents outside it.

Again in summary that's

tmux

  • Ctrl+V: pastes last thing copied from inside micro
  • Cmd+V: pastes last thing copied from outside micro
  • Ctrl+Shift+V: pastes last thing copied from outside micro
  • Ctrl+C: copies text from within file
  • Cmd+C: no "Copied selection" message
  • Ctrl+Shift+C: no "Copied selection" message

Is it possible to configure things so that I can copy from within micro and paste the contents both within and outside micro? And to copy something from outside micro and paste it within micro? Regardless of whether I'm doing this over ssh and/or tmux? I already set clipboard to terminal in my micro settings.json and configured the clipboard_control part of my kitty config to read_primary and read-clipboard.

Specifications

Commit hash: c2cebaa3
OS: MacOS Sonoma 14.3.1 ssh-ing into Ubuntu 22.04.4 LTS
Terminal: kitty 0.33.1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the clipboard behavior in micro under kitty, SSH, and tmux, comparing the listed key combinations and the clipboard setting. Check whether the expected result is bidirectional clipboard access both inside and outside micro, then document the configuration or behavior that consistently achieves it.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.