On 29/12/08 19:21, Dave Wood wrote:
> I'm trying to put the output of an external command onto the statusline,
> or, what would probably be better, into the line under the status bar,
> the input/output line.
>
> I've tried redirecting to a register and putting %...@a} on statusline but it
> puts the actual command and not the output there. This is one way I've
> tried:
>
> fun Txt2Rtf()
> !txt2rtf %> @A
> set statusline...@a}
> endfun
>
> I've also tried redir command.
>
> I'm not getting very far with this even though I've read help on redir,
> statusline, commands and googled for the past few hours.
>
> The txt2rft is a small bash script that uses abiword cli to convert plain
> txt to rft, and outputs a success or failure message. It's this message
> that I want to display somewhere while *not* having the 'Press enter...'
> line pop up.
>
> I don't know if this is possible at all but it would be very useful.
>
> Expectantly thanking you.
>
> Dave
>
:echomsg system('txt2rtf ' . expand('%'))
Depending on the number of lines in the ouput of your bash script, you
may want to set 'cmdheight' to a high enough value.
See
:help :echo
:help :echomsg
:help system()
:help 'cmdheight'
Best regards,
Tony.
--
My own dear love, he is strong and bold
And he cares not what comes after.
His words ring sweet as a chime of gold,
And his eyes are lit with laughter.
He is jubilant as a flag unfurled --
Oh, a girl, she'd not forget him.
My own dear love, he is all my world --
And I wish I'd never met him.
-- Dorothy Parker
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---