On Thu, 1 Mar 2007, Eric Roberts wrote:
> A.J.Mechelynck wrote:
> > Eric Roberts wrote:
> > > Hi,
> > >
> > > I'm interested in being able to send/recieve telnet messages. It's for a
> > > debugger that is used over telnet. I know this is a fairly esoteric
> > > problem, and as far as I can tell there's no direct way of doing this but
> > > I thought I'd might ask to be sure.
> > > If there isn't any direct support for this - what's the best method of
> > > extending Vim to do this? I've looked at the the vimsh plugin - which does
> > > nearly what I need it too, except interactive programs like the telnet
> > > client program on windows doesn't work.
> > > The gdbvim and the clewn project seem to demonstrate that is definately
> > > possible to communicate between different processes and Vim.
> > >
> > > I don't mind a learning curve, I'm just interested in where would I start?
> > > ;)
> > >
> > > Thanks for your time in advance,
> > >
> > > - Eric
> > >
> > Why do you want to use Vim to send and receive telnet messages? Vim is a
> > text editor, not a front-end for an interactive program like a shell (see
> > ":help shell-window) or the telnet program.
> > Start gvim in one (MS-Windows) window and telnet from a Dos Box in another
> > window, and you'll have Vim and telnet on the same screen.
> > Or if you're dead set on launching interactive sessions in an editor window,
> > use emacs (withing a Cygwin shell if necessary).
> > Best regards,
> > Tony.
> As stated above, it's for a telnet debugger. Vim is a programmer friendly text
I'd agree that this still seems like the wrong question :-) Is the
debugger running on the same machine as vim? Why does it use
telnet? Else, can you make it not do that, and [telnet to the remote
machine and ] just use the debugger with vim, without vim knowing
abut telnet, on the remote host?
Most vim use of things like :compiler and :make are non-interactive.
I think if you need to do this then you should use Expect, and/or
Perl/Ruby/???'s expect-like library to turn the telnet interaction
into something scripted and non-interactive. Getting the
interaction right is about the trickiest part of using Expect-like
Maybe the debugger has an API so you can drive it programmatically?
That could save you some of the pain of handling interaction for
humans by machine. Maybe someone knows about this debugger already,
and if you tell people what it is they can help better?
> editor and there seems to be a fair amount of effort to extend it to work with
> debuggers and I was curious about extending it to a specific one in my case. I
> would think that the existing extensions to use Vim with gdb would be somewhat
> analogous to my situation.
> - Eric