tags:

views:

86

answers:

2

I'm trying to figure out the "right" way to do this.. Where by "right" I mean least amount of work at decent frame rate.

Goal:

I have an OpenGL app. It can render text. I want the full power of vim inside of it. I'm running on MacOSX.

Possible solution:

I can capture all keystrokes as GLFW events --> is there a way I can reroute this to an already running (or newly created vim session)?

When a change happens in vim, is there a way I can get a char** representing the characters displayed on the screen?

If I can just tie these two things together, I can get vim "for free" in my app by just having it run vim on my machine and rerouting keystorkes / displays back & forth.

What is the easiest way to do this? (And should I be hacking the vim source code, or using some wrapper that can wrap vim for me).

Thanks!

I'm coding in C++; but solutions involving other languages is fine.

+1  A: 

It looks like you're looking for this:

http://rote.sourceforge.net/

It's a terminal emulation program. That page says it works but is stalled. There is a link to a forked project they said works better.

This is interesting...I'll have to try something like this someday.

Timothy Baldridge
+2  A: 

Some IDE use Vim's socket interface (also known as Vim Netbeans Protocol) to embed it.

Danilo Piazzalunga