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 4 years ago
g:asyncrun_program
.-program=xx
supports msys
, mingw32
, mingw64
and cygwin
:Try this on windows:
:let g:asyncrun_msys = 'd:/msys32'
:AsyncRun -program=msys ls -l && echo $(MSYS_CWD)
:AsyncRun -mode=term -program=mingw32 ls -l && echo $(MSYS_ROOT)
The -program=xx
can be totally customized now:
:let g:asyncrun_program.display = { opts -> 'echo ' . opts.cmd }
:AsyncRun -program=display ls -la
The origin command ls -la
will be modified to echo ls -la
in the display
modifier.
The msys
, mingw32
and wsl
are implemented as command modifiers.
Published by skywind3000 over 4 years ago
:execute
if command is starting with a colon :
.g:asyncrun_strict
to non-zero.Published by skywind3000 over 4 years ago
new macros for -program=wsl
on Windows:
$(WSL_FILEPATH)
$(WSL_FILENAME)
$(WSL_FILEDIR)
$(WSL_FILENOEXT)
$(WSL_PATHNOEXT)
$(WSL_RELDIR)
$(WSL_RELNAME)
$(WSL_ROOT)
$(WSL_CWD)
$(WSL_CFILE)
Published by skywind3000 over 4 years ago
$(VIM_PATHNOTEXT)
is not an absolute path, make it absolute.Published by skywind3000 over 4 years ago
-mode=term -safe=1
will break when $HOME
directory contains spaces.Published by skywind3000 over 4 years ago
$(VIM_PRONAME)
, $(VIM_DIRNAME)
, $(VIM_CLINE)
Published by skywind3000 over 4 years ago
$(VIM_FILETYPE)
to represent &filetype
.Published by skywind3000 over 4 years ago
Published by skywind3000 over 4 years ago
Published by skywind3000 over 4 years ago
This is the minimal version to support asynctasks.vim.
mode alises:
-mode=term -pos=vim
alias to -mode=bang
.-mode=term -pos=quickfix
alias to -mode=async -raw=1
.-mode=term -pos=os
alias to -mode=os
minor issues fixed.
Published by skywind3000 over 4 years ago
new terminal mode options: -safe
, -listed=0
and -reuse
:
-safe=1
: use a temporary script to pass arguments, this is the most accurate way for argument passing.-listed=0
: set nobuflisted
for the terminal buffer.-reuse
: when using -mode=term
and -pos=tab
together, try to use a reusable terminal tab.All of these are for -mode=term
only.
Published by skywind3000 over 4 years ago
-hidden
when using -mode=term
to set bufhidden
to hidden
Published by skywind3000 over 4 years ago
More safe to start a terminal.
exit when starting terminal failed with -pos=curwin
.
new: -program=wsl
to run command in wsl (windows 10 only):
:AsyncRun -program=wsl ls -la
:AsyncRun -program=wsl -dist=debian ls -la
new: -pos=curwin
to open terminal in current window:
:AsyncRun -mode=term -pos=curwin {command}
Published by skywind3000 over 4 years ago
noreletivenumber
for terminal window when using -mode=term
.Published by skywind3000 almost 5 years ago
AsyncRun -mode=term {command}
to open an internal terminal.