AsyncCommand : Execute commands and have them send their result to vim when they complete
| script karma
Downloaded by 4251
Comments, bugs, improvements
script versions (upload new version)
|AsyncCommand allows you to execute shell commands without waiting for them
to complete. When the application terminates, its output can be loaded into
a vim buffer. AsyncCommand is written to be compatible with Windows and
Linux (tested on Win7 and Ubuntu 11.04).
Currently three types of commands are supported:
run any program and load results in a split
grep for files and load results in quickfix
run make and load results in quickfix
AsyncCscopeFindSymbol, AsyncCscopeFindCalls, AsyncCscopeFindX
You can define your own commands commands by following the same format:
Define a launch function that passes the external command and result handler
(like asynchandler#quickfix) to asynccommand#run. You can use the handlers in
autoload/asynchandler.vim or define your own.
" echo hello and the parameter
let hello_cmd = "echo hello ".a:query
" just load the file when we're done
let vim_func = asynchandler#split()
" call our core function to run in the background and then load the
" output file on completion
call asynccommand#run(hello_cmd, vim_func)
Note that cscope functions require these variables:
let g:cscope_database = **full path to cscope database file**
let g:cscope_relative_path = **folder containing cscope database file**
These variables can be set by tagfilehelpers.vim -- https://github.com/pydave/daveconfig/blob/master/multi/vim/.vim/plugin/tagfilehelpers.vim
Please report bugs to https://github.com/pydave/AsyncCommand/issues
|Unzip to ~/.vim/ or to ~/.vim/bundle/asynccommand/ for use with pathogen (vimscript #2332).|
Click on the package to download.
ip used for rating: 18.104.22.168
||Fix some issues with console vim. Pass return code to handlers. Capture all output from commands. Add more error checking.
Thanks to patch contributors v.yurin and Dan Wanek.
||Re-add AsyncMake command
||Now a zip file.
Convert to an autoload script, add help file (big thanks to Peter Rincker!)
There are also now more predefined handlers to simplify writing your own AsyncCommands.
Fix tcsh shellredir bug (thanks to Chad Moore!)
||Fix terminal vim problem. Add error handling for when v:servername is not set. (Thanks to dfroger!)
||Missing braces on linux version of Async_Impl. Braces are required to make command asynchronous.
Add error checking for AsyncGrep.
||Add AsyncMake to run make asynchronously and open results in an error window.