moe icon indicating copy to clipboard operation
moe copied to clipboard

Make moe embeddable in other programs

Open tobimensch opened this issue 3 years ago • 0 comments

This is something that seperates nvim from vim, and why nvim is usable as an editor inside other IDEs and editors and programs in general.

I've also a project, where I would like to embed an advanced editor, and if it was possible, I'd choose moe.

Basically for this to work moe needs to be able to get mouse/key-event input not from a terminal, but from an external program. Also instead of displaying to a terminal, in this mode moe would need to write into a shared buffer with that external program for maximum performance.

I don't know all the details about such an API, because I've never done anything like it, but I think it should be possible to do.

This is low priority, as I've no immediate need for it, I just think that moe should be designed in such a way, that adding this feature later on, doesn't become harder than it needs to be. So, just keep in mind, that this could be a nice feature.

For example nvim is currently usable as editor inside vscode. If the same was possible with moe, it should be possible to share buffers between instances of moe, and of vscode with moe as embedded editor. And that way it would be easier to avoid stealing buffers from other programs. (I mean the likelihood of conflicting edits between those programs would lessen, if they shared one common pool of buffers, and if the same file is opened in both or all of them, then a change in one, is a change in all, instead of locked file errors, or overwriting conflicts...) Realistically many people like to use lightweight editors like moe, but sometimes have to use IDEs like vscode or intellij or something like it, because of special extensions they need, or their advanced features, now, if you could share buffers between moe and those IDEs you would have the benefits of both moe and them.

Not high priority, but definitely an interesting feature from a technical perspective.

tobimensch avatar Jul 07 '20 17:07 tobimensch