Showing background progress for long-running command

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

Showing background progress for long-running command

Wincent Colaiuta

I've set up a function that at its core does this:

  cexpr system("command that takes a long time to run")

Until the long-running process returns I can't interact with Vim --
which is fine and expected behaviour -- but I am wondering if there is
any way of displaying some kind of progress indication in the
meantime, even if it is just a static message like "Running foo..."

The closest I have found so far is this page:

  http://vim.wikia.com/wiki/Background_grep_searches

But that's a completely different approach: let the process run in the
background, continue to work with Vim, an then manually pull up the
results at some later time.

Are there any plug-ins out there that handle long-running external
processes in an elegant way that somebody can recommend for me to look
at and see what they do?

Cheers,
Wincent

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Showing background progress for long-running command

Tony Mechelynck

On 25/01/09 14:54, Wincent Colaiuta wrote:

> I've set up a function that at its core does this:
>
>    cexpr system("command that takes a long time to run")
>
> Until the long-running process returns I can't interact with Vim --
> which is fine and expected behaviour -- but I am wondering if there is
> any way of displaying some kind of progress indication in the
> meantime, even if it is just a static message like "Running foo..."
>
> The closest I have found so far is this page:
>
>    http://vim.wikia.com/wiki/Background_grep_searches
>
> But that's a completely different approach: let the process run in the
> background, continue to work with Vim, an then manually pull up the
> results at some later time.
>
> Are there any plug-ins out there that handle long-running external
> processes in an elegant way that somebody can recommend for me to look
> at and see what they do?
>
> Cheers,
> Wincent

What about

if 1 " has arithmetic evaluation compiled-in
        function System(command, ...)
                redraw
                if a:0 == 0
                        echomsg a:command
                        let rv = system(a:command)
                else
                        echomsg a:command '<' a:1
                        let rv = system(a:command, a:1)
                endif
                echo a:command ': Done'
                return rv
        endfunction
        abbrev system( System(
        abbrev sys( system(
endif

(untested)?


Best regards,
Tony.
--
You buttered your bread, now lie in it.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Color Schemes?

tsai
Hi everyone,

How do I add .vim color schemes to vim?

Thanks,

Vim-noob
Ubuntu 8.10- vim 7.1
Sent via BlackBerry by AT&T

-----Original Message-----
From: Tony Mechelynck <[hidden email]>

Date: Mon, 26 Jan 2009 06:56:32
To: <[hidden email]>
Subject: Re: Showing background progress for long-running command



On 25/01/09 14:54, Wincent Colaiuta wrote:

> I've set up a function that at its core does this:
>
>    cexpr system("command that takes a long time to run")
>
> Until the long-running process returns I can't interact with Vim --
> which is fine and expected behaviour -- but I am wondering if there is
> any way of displaying some kind of progress indication in the
> meantime, even if it is just a static message like "Running foo..."
>
> The closest I have found so far is this page:
>
>    http://vim.wikia.com/wiki/Background_grep_searches
>
> But that's a completely different approach: let the process run in the
> background, continue to work with Vim, an then manually pull up the
> results at some later time.
>
> Are there any plug-ins out there that handle long-running external
> processes in an elegant way that somebody can recommend for me to look
> at and see what they do?
>
> Cheers,
> Wincent

What about

if 1 " has arithmetic evaluation compiled-in
        function System(command, ...)
                redraw
                if a:0 == 0
                        echomsg a:command
                        let rv = system(a:command)
                else
                        echomsg a:command '<' a:1
                        let rv = system(a:command, a:1)
                endif
                echo a:command ': Done'
                return rv
        endfunction
        abbrev system( System(
        abbrev sys( system(
endif

(untested)?


Best regards,
Tony.
--
You buttered your bread, now lie in it.



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Color Schemes?

Nicolas Aggelidis

On Mon, Jan 26, 2009 at 8:19 AM,  <[hidden email]> wrote:
> Hi everyone,
>
> How do I add .vim color schemes to vim?
>
Hi, if you want to add a  colorscheme you go to www.vim.org, find the
one you like. Afterwards you download a .vim colorscheme file. Now you
place this file on your home's directory .vim folder, colors
subfolder. Finally you start gvim and from Edit-> Colorscheme select
the one you want.

To make the example more specific, lets say you want the oceandeep
colorscheme, you go to this page
http://www.vim.org/scripts/script.php?script_id=368, then you download
the oceandeep.vim file and you place it on ~/.vim/colors then you
start gvim and from the colorscheme menu you select oceandeap.

another way to achieve the same result would be to press :colorscheme oceandeap

also see :help :colorscheme


best regards,
nicolas

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Color Schemes?

tsai
" Afterwards you download a .vim colorscheme file. Now you
place this file on your home's directory .vim folder, colors
subfolder."

If I do not have a .vim folder, so no subfolders.  Should I just create one? I just have a .vimrc file when I do a ls -la in the home directory.  However, when in the terminal, inside vim, I can :colorscheme tab and see all the schemes currently available.  I just don't know where to put the .vim files now.


On Mon, Jan 26, 2009 at 12:01 AM, Nicolas Aggelidis <[hidden email]> wrote:

On Mon, Jan 26, 2009 at 8:19 AM,  <[hidden email]> wrote:
> Hi everyone,
>
> How do I add .vim color schemes to vim?
>
Hi, if you want to add a  colorscheme you go to www.vim.org, find the
one you like. Afterwards you download a .vim colorscheme file. Now you
place this file on your home's directory .vim folder, colors
subfolder. Finally you start gvim and from Edit-> Colorscheme select
the one you want.

To make the example more specific, lets say you want the oceandeep
colorscheme, you go to this page
http://www.vim.org/scripts/script.php?script_id=368, then you download
the oceandeep.vim file and you place it on ~/.vim/colors then you
start gvim and from the colorscheme menu you select oceandeap.

another way to achieve the same result would be to press :colorscheme oceandeap

also see :help :colorscheme


best regards,
nicolas





--
tsai

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Color Schemes?

Benjamin Fritz



On Jan 26, 3:14 am, tsai <[hidden email]> wrote:

> " Afterwards you download a .vim colorscheme file. Now you
> place this file on your home's directory .vim folder, colors
> subfolder."
>
> If I do not have a .vim folder, so no subfolders.  Should I just create one?
> I just have a .vimrc file when I do a ls -la in the home directory.
> However, when in the terminal, inside vim, I can :colorscheme tab and see
> all the schemes currently available.  I just don't know where to put the
> .vim files now.
>

First:

When asking a question or otherwise posting to this list, please
CREATE A NEW TOPIC rather than replying to an old one and changing the
subject. Most email clients, as well as the google groups interface,
will group topics into a single thread for easier reading. Your
message is now in a completely unrelated thread.

Second:

Yes, you should just create the .vim directory. If there is nothing in
the directory or its subdirectories, then it will have no effect on
Vim. If you are on Windows, name it "vimfiles" rather than ".vim".

Finally:

The convention on this mailing list is to bottom-post, meaning that
when you respond to a message, you should quote a relevant portion of
the message you are responding to, then place your response _below_ it
as I have done.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---