Hi @ll

>> Start by reading core/tovl/docs/tovl.txt <<
>> If something goes wrong read :h tovl-logging <<

You can use the TOVL library to run tasks in the background now.

It looks like this:

        let p = tovl#runtaskinbackground#NewProcess(
          \ {'name' : 'compilation', 'cmd': ["/bin/sh","-c",'sleep 10; echo 
done']})
        call p.Run()

By setting your own process object decorator you can do fancy things
such as counting background process, change colorschemes, open quickfix
automatically etc..

An implementation could look like this.
You have to register your decorator instead of the default one (doing nothing)

        fun! tovl#runtaskinbackground#DefaultDecorator(p)
        return a:p
          " this could look like this:
          let child = {}
          fun! child.OnStart()
            colorscheme foo
            return self.Parent_OnStart()
          endf
          fun! child.OnFinish()
            colorscheme bar
            cope
            return self.Parent_OnFinish()
          endf
          return p.createChildClass(child)
        endf

You still can get the code here:
http://github.com/MarcWeber/theonevimlib

Enjoy and join!
Let me know if something doesn't work for you.
(Windows hasn't been tested at all. Shouldn't be too hard to fix that)

Sincerly
        Marc Weber

PS: total number of plugins is 19 now:
It contains the most useful stuff I've been using the last year now.

        PluginHighlightCurrentLineInActiveWindow
        PluginMoveCopyFile
        PluginCreateDirOnBufWrite
        PluginChooseCompletionFunc
        PluginExample
        PluginVL_RepoStuff
        PluginHighlightCurrentLineInActiveWindow
        PluginMoveCopyFile
        PluginCreateDirOnBufWrite
        PluginUsefulBufferMappings
        PluginUsefulTabMappings
        PluginUsefulVariousMappings
        PluginGlobOpen
        PluginMoveToThingAtCursor
        PluginVL_Templates
        PluginErrorFormats
        PluginLog
        PluginRunTaskInBackground

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

Reply via email to