shell commands in windows

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

shell commands in windows

David Ohlemacher
Hello all,

I would like to write a script to take advantage of vim's windowing.

I have maybe a dozen files that I need to monitor.   Is there a way to open vim or gvim, and then have it tail -f each file in separate windows?   I can do this manually from within gvim, but how does one script window creation and script the running of arbitrary shell commands within each?  I'd really like pipe tail -f through sed to so I could color code specific strings etc.

Hints would be greatly appreciated. I am currently using a multi-tabbed terminal, but I can only see one file at a time.  I would prefer not to have to install tools (though I would if req'd) since this may need to move to many machines.

Thanks,
-d  
-- 
David Ohlemacher
Senior Software Engineer
Scientific Solutions Inc. 
99 Perimeter Rd Nashua New Hampshire 03063
603-880-3784

. o .
. . o
o o o

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: shell commands in windows

Ivan Krasilnikov
On Wed, Mar 9, 2011 at 21:56, David Ohlemacher <[hidden email]> wrote:
> Hello all,
>
> I would like to write a script to take advantage of vim's windowing.
>
> I have maybe a dozen files that I need to monitor.   Is there a way to open
> vim or gvim, and then have it tail -f each file in separate windows?   I can
> do this manually from within gvim, but how does one script window creation
> and script the running of arbitrary shell commands within each?  I'd really
> like pipe tail -f through sed to so I could color code specific strings etc.

It seems to me that GNU screen or a similar program would be a much
better tool for your task than vim.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: shell commands in windows

Jan Larres
In reply to this post by David Ohlemacher
Hi,

David Ohlemacher <[hidden email]>:
> I have maybe a dozen files that I need to monitor.   Is there a way
> to open vim or gvim, and then have it tail -f each file in separate
> windows?   I can do this manually from within gvim, but how does one
> script window creation and script the running of arbitrary shell
> commands within each?  I'd really like pipe tail -f through sed to
> so I could color code specific strings etc.

Have a look at multitail:
http://www.vanheusden.com/multitail/

Jan

--
-[ OpenPGP key ID: 00A0FD5F ]-
When we remember we are all mad, the mysteries disappear and life stands
explained.
                -- Mark Twain

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php