[announcement] Windows gVim user can do wget without a flashing DOS box

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

[announcement] Windows gVim user can do wget without a flashing DOS box

Sean-130
When gVim.exe is used on Microsoft Windows and an external program
is called, a flashing DOS box displaying on Windows status bar is
a constant pain.

It is getting worse when system() call if frequently used, as we
found while working on VimIM plugin, in which every single keyboard
type may be sent to "input Cloud", if user sets that option.

The workaround, as we found, is to use lib call instead. To make it
happen, a special Windows DLL is created:
http://vimim.googlecode.com/svn/mycloud/client/libvimim.dll

The source code is also made available at
http://vimim.googlecode.com/svn/mycloud/

Basically, it can be used to replace any system("wget " ...) call from
within gVim.

Welcome to share more ideas to make Microsoft Windows really
useful. :)


Thanks

Sean

--
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: [announcement] Windows gVim user can do wget without a flashing DOS box

bill lam
ven, 22 Jan 2010, Sean skribis:

> When gVim.exe is used on Microsoft Windows and an external program
> is called, a flashing DOS box displaying on Windows status bar is
> a constant pain.
>
> It is getting worse when system() call if frequently used, as we
> found while working on VimIM plugin, in which every single keyboard
> type may be sent to "input Cloud", if user sets that option.
>
> The workaround, as we found, is to use lib call instead. To make it
> happen, a special Windows DLL is created:
> http://vimim.googlecode.com/svn/mycloud/client/libvimim.dll
>
> The source code is also made available at
> http://vimim.googlecode.com/svn/mycloud/
>
> Basically, it can be used to replace any system("wget " ...) call from
> within gVim.
>
> Welcome to share more ideas to make Microsoft Windows really
> useful. :)

A Japanese gentleman had written an dll as a replacement of system().  You may
find it inside vim wikia.

/*
 * Usage:
 *   :echo libcall("mysystem", "mysystem", "cmd.exe\ndir\n")
 *   :echo libcall("mysystem", "mysystem", "wget http://foo/bar.html")
 *
 * Reference:
 *   http://support.microsoft.com/kb/190351/
 *
 * Only work for Gvim.
 *
 * XXX: no error handling
 */

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

--
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: [announcement] Windows gVim user can do wget without a flashing DOS box

panshizhu
bill lam 写道:

> A Japanese gentleman had written an dll as a replacement of system().  You may
> find it inside vim wikia.
>
> /*
>  * Usage:
>  *   :echo libcall("mysystem", "mysystem", "cmd.exe\ndir\n")
>  *   :echo libcall("mysystem", "mysystem", "wget http://foo/bar.html")
>  * Reference:
>  *   http://support.microsoft.com/kb/190351/
>  * Only work for Gvim.
>  * XXX: no error handling
>  */


The idea behind OP's topic is not only to eliminate the "flash of title
bar", but also to improve the performance.

The cost of starting a new process in Windows is much higher than that
of Linux. While our plugin will execute on every keystroke, so we write
a dll to avoid creating a new process on each keystroke.

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