On Fri, Apr 28, 2006 at 11:29:35AM +0900, Meino Christian C. wrote:
} > Meino Christian C. wrote:
} > > Hi,
} > >
} > > sorry for this offtopic mail, but I asked this on the vim-user
} > > mailing list and git no answer…
} > >
} > > What I wnat to do seems to be simple: I want to write a script
} > > with vim and – without saveing it – pass it to the ruby
} > > and get back the output including stderr AND stdout back into a
} > > buffer.
} Thanks a lot for that trick, Reid !
} But this only write the buffer, start ruby, exute that file with ruby
} with ridirected output to another file and reads back that file into
} vim. Additionally it does not check, whether both files already
} exist…thex will be overwritten simply.
} I wanted to exeute ruby with the buffer contents without writing to
} the disk at all for that reason.
} Is this possible ?
I can get you stderr and stdout mised together, not in separate files:
This yanks the entire buffer into register r, opens a new window, pastes
register r into the window, feeds the entire buffer into ruby’s stdin
replaces the buffer with what the script writes to stdout or stderr.
Unfortunately, I don’t know how to distinguish between output to stdout
stderr. Since you are writing the script, however, you should know which