[Haskell-cafe] ghci Vim completion within Vim - need some advice

Marc Weber marco-oweber at gmx.de
Fri Mar 18 02:41:26 CET 2011


Hi,

https://github.com/MarcWeber/vim-addon-async
implements a hacky way to run external processes asynchronously.
An external helper application send stdout of the process to Vim which
adds the bytes to the buffer.

Its not perfect but quite usable.

Now I'd like to show the completion of \t sent to ghci to the user.

I've done so for Ruby, Python and Scala: Vim sends input to ghci, and
the reply is catched and put into Vim's completion list.

issue 1): ghci's tab only works if its connected to a "terminal".
          This can be fixed easily by using a pseudo terminal

issue 2): ghci's prompt sends data to /dev/tty (the controlling
          terminal) rather than to stdout/err.

I don't know how to fix issue 2). Any ideas?

The result could look like this python REPL screenshot:
http://mawercer.de/~marc/vim-addon-async-python-repl.jpg

Marc Weber



More information about the Haskell-Cafe mailing list