Skip to content

Commit

Permalink
Add documentation for other commands
Browse files Browse the repository at this point in the history
I originally omitted docs for these commands because I considered them
examples and wanted to move them to separate plugins, but since they all
replace built-in vim functionality I'm keeping them as part of the core
plugin.
  • Loading branch information
pydave committed Feb 4, 2013
1 parent 996abe6 commit 0f57fb6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
32 changes: 32 additions & 0 deletions doc/asynccommand.txt
Expand Up @@ -37,6 +37,38 @@ Commands~
:AsyncShell {cmd} *:AsyncShell*
Execute shell {cmd} in the background. When it completes, open
the result in a split window.
Completes shell commands.

:AsyncGrep [arguments] *:AsyncGrep*
Run a grep command in the background using 'grepprg'. On
completion, the results are loaded in the quickfix. The window
is titled with the query.
Completes filenames.

:AsyncMake [arguments] *:AsyncMake*
Run a build in the background using 'makeprg'. On completion,
the build output is loaded in the quickfix. The window is
titled with the build target.

:AsyncCscopeFindX {querytype} {name} *:AsyncCscopeFindX*
Run a cscope search in the background using 'cscopeprg'. On
completion, the results are loaded in the quickfix. The window
is titled with the query.
Usage is the same as the |cscope-find| command: Expects the
character describing the query type and the query name. For
example, to search for the functions called by main():
>
:AsyncCscopeFindX d main
<
Completes tags.

:AsyncCscopeFindSymbol {name} *:AsyncCscopeFindSymbol*
Same as AsyncCscopeFindSymbol but automatically prepends 's'.
Just expects a symbol name.

:AsyncCscopeFindCalls {name} *:AsyncCscopeFindCalls*
Same as AsyncCscopeFindSymbol but automatically prepends 'c'.
Just expects a function name.

*asynccommand-functions*
Functions~
Expand Down
5 changes: 1 addition & 4 deletions plugin/asynccommand.vim
Expand Up @@ -37,11 +37,8 @@ function! AsyncCommandDone(file, return_code)
endfunction

command! AsyncPending call asynccommand#open_pending()
command! -nargs=+ -complete=shellcmd AsyncCommand call asynccommand#run(<q-args>)

" Examples below
" ==============

command! -nargs=+ -complete=shellcmd AsyncCommand call asynccommand#run(<q-args>)
command! -nargs=+ -complete=file AsyncGrep call s:AsyncGrep(<q-args>)
command! -nargs=+ -complete=file -complete=shellcmd AsyncShell call s:AsyncShell(<q-args>)
command! -nargs=* AsyncMake call s:AsyncMake(<q-args>)
Expand Down

0 comments on commit 0f57fb6

Please sign in to comment.