Run Async Shell Commands in Vim 8.0 / NeoVim and Output to the Quickfix Window !!
MIT License
Bot releases are hidden (Show)
Published by skywind3000 over 3 years ago
Published by skywind3000 over 3 years ago
-close
for -mode=term
to close the terminal automatically when terminal process finished.-pos=TAB
for -mode=term
to open a terminal in a new tab residing on the left side.try:
:AsyncRun -mode=term -pos=TAB -close lazygit
When you are using -pos=TAB
, lazygit will run in a new tab on the left side of current tabpage. when it finished, you can return to your previous tabpage directly. More convenience than -pos=tab
when you want to return to previous tab.
Published by skywind3000 over 3 years ago
AsyncRunPre
, AsyncRunStart
, AsyncRunStop
for "-mode=wait"Published by skywind3000 almost 4 years ago
s:ScriptWrite
interface to asyncrun#script_write
.Published by skywind3000 almost 4 years ago
AsyncRunInterrupt
when job is stopped by AsyncStop
. (see PR https://github.com/skywind3000/asyncrun.vim/pull/154)Published by skywind3000 over 4 years ago
b:asyncrun_root
, t:asyncrun_root
and g:asyncrun_root
:eg:
let g:asyncrun_root = '/usr/local'
and
:AsyncRun -cwd=<root> pwd
output:
/usr/local
Published by skywind3000 over 4 years ago
$(VIM_PWD)
or <pwd>
for vim's current working directory (which :pwd
returns).$(VIM_PWD)
and $(VIM_CWD)
is that $(VIM_CWD)
will change if -cwd=xxx
is given.example:
:cd /usr/share
than:
:AsyncRun -cwd=/usr/include echo from $(VIM_PWD) to $(VIM_CWD)
output:
from /usr/share to /usr/include
Published by skywind3000 over 4 years ago
Published by skywind3000 over 4 years ago
shellslash
option.Published by skywind3000 over 4 years ago
Published by skywind3000 over 4 years ago
g:asyncrun_rootmarks
accepts wildcards like "*" or "?".-reuse=0
can be used in split terminals.Published by skywind3000 over 4 years ago
Published by skywind3000 over 4 years ago
-pos
accepts a new uppercase TAB
to open internal terminal on the left of current tab.Published by skywind3000 over 4 years ago
Published by skywind3000 over 4 years ago
Published by skywind3000 over 4 years ago
g:asyncrun_name
in normal quickfix jobs.Published by skywind3000 over 4 years ago
-post=xxx
is available in terminal mode-pos=hide
in terminal mode-name=abc
to specify a name for terminal taskg:asyncrun_name
to get terminal task name.example:
:AsyncRun -mode=term -pos=hide -name=abc -post=echo\ g:asyncrun_name ls -la
When it finished, script in -post=?
will be executed and the name abc
will display, while g:asyncrun_code
stores the exit code.
Published by skywind3000 over 4 years ago
-mode=term -pos=tab
obeys -focus=0
now, try::AsyncRun -mode=term -pos=tab -focus=0 ls -la
Published by skywind3000 over 4 years ago
Published by skywind3000 over 4 years ago
-silent
to prevent open quickfix window no matter g:asyncrun_open
is set or not.-program=new_modifer
.