moe icon indicating copy to clipboard operation
moe copied to clipboard

Clipboard edit mode

Open tobimensch opened this issue 4 years ago • 1 comments

I've not seen something like it in other editors, so this would be unique to moe, if implemented.

This mode could be activated with: :clipboard or :clip

And then you'd get the current contents of the clipboard in the normal moe editing mode, with the only difference being that you're editing the clipboard text instead of a file.

When writing with: :w

The system clipboard should be overwritten with the edited content of this clipboard buffer.

The idea is that you can copy text in your browser, open that text in moe with the clip command, then make some edits using normal moe operations, and then insert that changed clipboard content for example into an email application or whereever.

So with this mode moe could be used as an intermediary between other applications and the clipboard.

It could also be used for moe internally, so when you want to insert something from a clipboard, you can first edit it, then go back to your normal buffer and insert the edited clipboard content as many times as you like.

Note that there's a difference between clipboard contents and the current selection on X11 systems, so I'm not currently sure if there should be two modes like :clip and :selection. If both exist maybe clip could open a split window with clipboard contents being on top and selection contents being on the bottom. Not sure how to do that best.

tobimensch avatar Jul 07 '20 15:07 tobimensch

@tobimensch

It's an interesting idea. I will implement in the future.

fox0430 avatar Jul 07 '20 16:07 fox0430