• Stars
    star
    1,852
  • Rank 25,041 (Top 0.5 %)
  • Language
    Vim Script
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿš€ Run Async Shell Commands in Vim 8.0 / NeoVim and Output to the Quickfix Window !!

Preface

This plugin takes the advantage of new APIs in Vim 8 (and NeoVim) to enable you to run shell commands in the background and read the output in the quickfix window in realtime:

  • Easy to use, start your background command by :AsyncRun (just like old ! cmd).
  • The command is running in the background, no need to wait for the entire process to finish.
  • Output is displayed in the quickfix window, errors are matched with errorformat.
  • You can explore the error output immediately or keep working in vim while executing.
  • Ring the bell or play a sound to notify your job is finished while you're focusing on editing.
  • Customizable runners and command modifiers bring you the dark power of asyncrun.
  • Fast and lightweight, just a single self-contained asyncrun.vim source file.
  • Provide corresponding user experience in vim, neovim, gvim, and macvim.

If that doesn't excite you, then perhaps this GIF screen capture below will change your mind.

ใ€README in Chinese | ไธญๆ–‡ๆ–‡ๆกฃใ€‘

News

  • 2021/12/15 new extra runners to run command in a tmux, or floaterm window.
  • 2020/02/18 asynctasks uses asyncrun to introduce vscode's task system to vim.
  • 2020/01/21 run command in internal terminal with -mode=term see here.
  • 2020/04/17 AsyncRun now supports command range, try: :%AsyncRun cat.

Install

Install with vim-plug:

Plug 'skywind3000/asyncrun.vim'

Example

Remember to open vim's quickfix window by :copen (or setting g:asyncrun_open) before invoking AsyncRun, otherwise, you will not see any output.

Contents

Tutorials

Async run gcc to compile current file

:AsyncRun gcc "$(VIM_FILEPATH)" -o "$(VIM_FILEDIR)/$(VIM_FILENOEXT)"
:AsyncRun g++ -O3 "$(VIM_FILEPATH)" -o "$(VIM_FILEDIR)/$(VIM_FILENOEXT)" -lpthread 

This command will run gcc in the background and output to the quickfix window in real time. Macro '$(VIM_FILEPATH)' stands for filename with full path and '$(VIM_FILENOEXT)' represents filename without extension.

Async run make

:AsyncRun make
:AsyncRun make -f makefile

Remember to open the quickfix window by :copen before using the AsyncRun command, if you don't open it, you will not see any output.

Grep key word

:AsyncRun! grep -R -n word . 
:AsyncRun! grep -R -n <cword> . 

when ! is included, auto-scroll in quickfix will be disabled. <cword> represents current word under cursor.

Compile go project

:AsyncRun go build "$(VIM_FILEDIR)"

Macro '$(VIM_FILEDIR)' stands for the current file dir.

Lookup man page

:AsyncRun! man -S 3:2:1 <cword>

Git push

:AsyncRun git push origin master

Git push from project root

:AsyncRun -cwd=<root> git push origin master

Use -cwd=? to specify the working directory, macro <root> or $(VIM_ROOT) represents current Project Root.

Setup <F7> to compile file

:noremap <F7> :AsyncRun gcc "$(VIM_FILEPATH)" -o "$(VIM_FILEDIR)/$(VIM_FILENAME)" <cr> 

File name may contain spaces, therefore, it's safe to quote them.

Run a python script

:AsyncRun -cwd=$(VIM_FILEDIR) python "$(VIM_FILEPATH)"

New option -raw will display the raw output (without matching to errorformat). Remember to put let $PYTHONUNBUFFERED=1 in your .vimrc to disable python stdout buffering, see here.

Run a python script in a new terminal

:AsyncRun -cwd=$(VIM_FILEDIR) -mode=term -pos=TAB  python "$(VIM_FILEPATH)"

This will run python in the internal-terminal (vim 8.2 or nvim-0.4.0 is required) in a new tabpage.

A good assistant to asyncrun

asynctasks.vim a plugin built upon asyncrun, an easy way to use asyncrun. It allows you to manage your building, testing, and deploying tasks in a global or project local configuration, and run them by their names.

Manual

There are two vim commands: :AsyncRun and :AsyncStop to control async jobs.

AsyncRun - Run shell command

:AsyncRun[!] [options] {cmd} ...

Run shell command in the background and output to quickfix. when ! is included, auto-scroll in quickfix will be disabled. Parameters are split by space, if a parameter contains space, it should be quoted or escaped as backslash + space (Unix only).

Macro variables in the parameters will be expanded before executing:

$(VIM_FILEPATH)  - File name of current buffer with full path
$(VIM_FILENAME)  - File name of current buffer without path
$(VIM_FILEDIR)   - Full path of current buffer without the file name
$(VIM_FILEEXT)   - File extension of current buffer
$(VIM_FILENOEXT) - File name of current buffer without path and extension
$(VIM_PATHNOEXT) - Current file name with full path but without extension
$(VIM_CWD)       - Current directory
$(VIM_RELDIR)    - File path relativize to current directory
$(VIM_RELNAME)   - File name relativize to current directory 
$(VIM_ROOT)      - Project root directory
$(VIM_CWORD)     - Current word under cursor
$(VIM_CFILE)     - Current filename under cursor
$(VIM_GUI)       - Is running under gui ?
$(VIM_VERSION)   - Value of v:version
$(VIM_COLUMNS)   - How many columns in vim's screen
$(VIM_LINES)     - How many lines in vim's screen
$(VIM_SVRNAME)   - Value of v:servername for +clientserver usage
$(VIM_PRONAME)   - Name of current project root directory
$(VIM_DIRNAME)   - Name of current directory

Environment variables with same name, like $VIM_FILENAME, are also initialized. Thus your child process can access them with getenv(xxx) at any time.

Some macros variables have their short names starting with '<' :

<cwd>   - Current directory
<cword> - Current word under cursor
<cfile> - Current file name under cursor
<root>  - Project root directory

They are also acceptable. So, you can use both $(VIM_ROOT) or its alias <root> to represent Project Root of the current file. Macro variables can be quoted with "..." in the command string when file name contains spaces (like normal shell command escaping), but they should not be quoted in the -cwd=? option.

There can be some options before your [cmd]:

Option Default Description
-mode=? "async" specify how to run the command as -mode=?, available modes are "async" (default), "bang" (with ! command) and "terminal" (in internal terminal), see running modes for details.
-cwd=? unset initial directory (use current directory if unset), for example use -cwd=<root> to run commands in project root directory, or -cwd=$(VIM_FILEDIR) to run commands in current buffer's parent directory.
-save=? 0 use -save=1 to save current file, -save=2 to save all modified files before executing.
-program=? unset set to make to use &makeprg, grep to use &grepprt and wsl to execute commands in WSL (windows 10), see command modifiers.
-post=? unset vimscript to exec after job finished, spaces must be escaped to '\ '
-auto=? unset event name to trigger QuickFixCmdPre/QuickFixCmdPost [name] autocmd.
-raw unset use raw output if present, and &errorformat will be ignored.
-strip unset remove the heading/trailing messages if it is present (omit command and "[Finished in ...]" message).
-errorformat=? unset errorformat for error matching, if it is unprovided, use current &errorformat value. Beware that % needs to be escaped into \%.
-silent unset provide -silent to prevent open quickfix window (will override g:asyncrun_open temporarily)
-scroll=? unset set to 0 to prevent quickfix auto-scrolling
-once unset provide to buffer all output and flush when job is finished, useful when there are multi-line patterns in your errorformat
-encoding=? unset specify command encoding independently (overshadow g:asyncrun_encs)
-pos=? "bottom" When using internal terminal with -mode=term, -pos is used to specify where to split the terminal window, it can be one of "tab", "curwin", "top", "bottom", "left", "right" and "external". And you can customize new runners and pass runner's name to -pos option.
-rows=num 0 When using a horizontal split terminal, this value represents the height of terminal window.
-cols=num 0 When using a vertical split terminal, this value represents the width of terminal window.
-focus=? 1 set to 0 to prevent focus changing when -mode=term
-hidden=? 0 set to 1 to init bufhidden to hide for internal terminal, set to 0 to init bufhidden to wipe
-listed=? 1 when using -mode=term, set to 0 to hide the terminal in the buffer list
-close unset when using -mode=term, close the terminal automatically when terminal process is finished

For the full list of the options, please see the Command Specification.

All options must start with a minus and position before [cmd]. Since no shell command string starting with a minus. So they can be distinguished from shell command easily without any ambiguity.

Don't worry if you do have a shell command starting with '-', Just put a placeholder @ before your command to tell asyncrun explicitly: "stop parsing options now, the following string is all my command".

AsyncStop - Stop the running job

:AsyncStop[!]

stop the running job, when "!" is included, job will be stopped by signal KILL.

Function (API)

Function form is convenient for vimscript:

:call asyncrun#run(bang, opts, command)

parameters:

  • bang: an empty string or a single bang character "!", same as bang sign in AsyncRun!.
  • opts: a dictionary contains: mode, cwd, raw and errorformat etc.
  • command: the shell command you want to execute.

Settings

  • g:asyncrun_exit - script will be executed after finished.
  • g:asyncrun_bell - non-zero to ring a bell after finished.
  • g:asyncrun_mode - specify how to run your command, see here.
  • g:asyncrun_encs - set shell encoding if it's different from &encoding, see encoding.
  • g:asyncrun_trim - non-zero to trim the empty lines in the quickfix window.
  • g:asyncrun_auto - event name to trigger QuickFixCmdPre/QuickFixCmdPost, see FAQ.
  • g:asyncrun_open - above zero to open quickfix window at given height after command starts.
  • g:asyncrun_save - non-zero to save current(1) or all(2) modified buffer(s) before executing.
  • g:asyncrun_timer - how many messages should be inserted into quickfix every 100ms interval.
  • g:asyncrun_wrapper - enable to setup a command prefix.
  • g:asyncrun_stdin - non-zero to enable stdin (useful for cmake on windows).
  • g:asyncrun_qfid - use quickfix id to prevent interleaving output of concurrent plugins appending to the quickfix list.

For more information of above options, please visit option details.

Variables

  • g:asyncrun_code - exit code
  • g:asyncrun_status - 'running', 'success' or 'failure'

Autocmd

autocmd User AsyncRunPre   - triggered before executing
autocmd User AsyncRunStart - triggered after starting successfully
autocmd User AsyncRunStop  - triggered when job finished

Note, AsyncRunPre is always likely to be invoked, but AsyncRunStart and AsyncRunStop will only be invoked if the job starts successfully.

When the previous job is still running or vim job slot is full, AsyncRun may fail. In this circumstance, AsyncRunPre will be invoked but AsyncRunStart and AsyncRunStop will have no chance to trigger.

Project Root

Vim is lack of project management, as files usually belong to projects, you can do nothing to the project if you don't have any information about where the project locates. Inspired by CtrlP, this feature (new in version 1.3.12) is very useful when you've something to do with the whole project.

Macro <root> or $(VIM_ROOT) in the command line or in the -cwd option will be expanded as the Project Root Directory of the current file:

:AsyncRun make
:AsyncRun -cwd=<root> make

The first make will run in the vim's current directory (which :pwd returns), while the second one will run in the project root directory of current file. This feature is very useful when you have something (make / grep) to do with the whole project.

The project root is the nearest ancestor directory of the current file which contains one of these directories or files: .svn, .git, .hg, .root or .project. If none of the parent directories contains these root markers, the directory of the current file is used as the project root. The root markers can also be configurated, see Project Root.

Running Modes

The default behavior is to run async command and output to quickfix window. However there is a -mode=? option can allow you specify how to run your command:

mode description
async default behavior, run async command and output to quickfix window
bang same as !
term open a reusable internal terminal window and run your command

For more information, please see here.

Internal Terminal

AsyncRun is capable to run commands in Vim/NeoVim's internal terminal with the -mode=term option. You can specify how to open the terminal window by -pos=?, available positions are:

  • -pos=tab: open the terminal in a new tab.
  • -pos=TAB: open the terminal in a new tab on the left side.
  • -pos=curwin: open the terminal in the current window.
  • -pos=top: open the terminal above the current window.
  • -pos=bottom: open the terminal below the current window.
  • -pos=left: open the terminal on the left side.
  • -pos=right: open the terminal on the right side.
  • -pos=hide: don't open a window, run in background.
  • -pos=external: use an external terminal (Windows & Gnome only).

Examples:

:AsyncRun -mode=term -pos=tab python "$(VIM_FILEPATH)"
:AsyncRun -mode=term -pos=TAB -close -cwd=<root> lazygit
:AsyncRun -mode=term -pos=bottom -rows=10 python "$(VIM_FILEPATH)"
:AsyncRun -mode=term -pos=right -cols=80 python "$(VIM_FILEPATH)"
:AsyncRun -mode=term -pos=curwin python "$(VIM_FILEPATH)"
:AsyncRun -mode=term -pos=curwin -hidden python "$(VIM_FILEPATH)"

Internal terminal related options:

Option Default Description
-pos=? "bottom" When using internal terminal with -mode=term, -pos is used to specify where to split the terminal window, it can be one of "tab", "curwin", "top", "bottom", "left", "right" and "external".
-rows=num 0 When using a horizontal split terminal, this value represents the height of terminal window.
-cols=num 0 When using a vertical split terminal, this value represents the width of terminal window.
-focus=? 1 set to 0 to prevent focus changing when -mode=term
-close unset when using -mode=term, close the terminal automatically when terminal process is finished
-hidden=? 0 set to 1 to setup bufhidden to hide for internal terminal
-listed=? 1 when using -mode=term, set to 0 to hide the terminal in the buffer list

The -pos field accepts an uppercase TAB, to create a tab on the left of the current tab. When using internal terminal in a split window, AsyncRun will firstly reuse a finished previous terminal window if it exists, if not, a new terminal window will be created in given position. Tab based terminal can also be reusable if -reuse is provided.

Terminal Name

There can be many commands running in the internal terminal, you can specify a name for each of them and receive it in g:asyncrun_name:

:AsyncRun -mode=term -pos=hide -name=123 -post=echo\ g:asyncrun_name  ls -la

When this process finished, script defined in -post will be executed and your command name will display by echo. Another variable g:asyncrun_code stores exit code.

Quickfix window

AsyncRun displays its output in quickfix window, so if you don't use :copen {height} to open quickfix window, you won't see any output. For convenience there is an option g:asyncrun_open for you:

:let g:asyncrun_open = 8

Setting g:asyncrun_open to 8 will open quickfix window automatically at 8 lines height after command starts.

Range support

AsyncRun can take a range of lines in the current buffer as command's stdin after version 1.3.27. You can try:

:%AsyncRun cat

the whole buffer will be the input of command cat. you will see the content of your current buffer will be output to the quickfix window.

:10,20AsyncRun python

text between line 10-20 will be taken as the stdin of python. code in that range will be executed by python and the output will display in the quickfix window.

:'<,'>AsyncRun -raw perl

The visual selection (line-wise) will be taken as stdin.

Advanced Topics

AsyncRun provides enough flexibility and possibility to customize various details of how to run a command.

Extra Runners

Besides the default quickfix and internal terminal mechanism, the user-defined runners allow you to run commands in any way you want. eg. in a new gnome-terminal window/tab, a floaterm window, or a side-by-side tmux split.

By default, AsyncRun is shipped with some popular runners:

Runner Description Requirement Link
gnome run in a new gnome terminal GNOME gnome.vim
gnome_tab run in a new gnome terminal tab GNOME gnome_tab.vim
xterm run in a xterm window xterm xterm.vim
tmux run in a separated tmux split Vimux tmux.vim
floaterm run in a new floaterm window floaterm floaterm.vim
floaterm_reuse run in a reusable floaterm window floaterm floaterm_reuse.vim
quickui run in a quickui window vim-quickui quickui.vim
termhelp run in terminal help vim-terminal-help termhelp.vim
toggleterm run in a toggleterm window toggleterm.nvim toggleterm.vim
xfce run in a new xfce terminal xfce4-terminal xfce.vim
konsole run in a new konsole terminal KDE konsole.vim
macos run in a macOS system terminal macOS macos.vim
iterm run in a new iTerm2 tab macOS + iTerm2 iterm.vim

e.g.

:AsyncRun -mode=term -pos=gnome      ls -la
:AsyncRun -mode=term -pos=floaterm   ls -la
:AsyncRun -mode=term -pos=tmux       ls -la

Screenshot for gnome runner:

When using gnome, konsole, or xfce runner in GVim, you get exactly the same experience like starting a command-line program from IDEs.

When you use toggleterm2 and use the packer.nvim management plugin, you can set shortcut keys to specify the open window, such as:

	use({
		"skywind3000/asyncrun.vim",
		as = "asyncrun",
		config = function()
			require("asyncrun_toggleterm").setup({
				mapping = "<leader>tt",
				start_in_insert = false,
			})
		end,
	})

All runners are customizable, you can modify or define your own runners, see the next section "customize runner".

Customize Runner

User-defined runners allow you to specify how the command will run by creating a new runner. It can be useful when you want your commands run in a tmux split or a new gnome-terminal window:

function! MyRunner(opts)
    echo "command to run is: " . a:opts.cmd
endfunction

let g:asyncrun_runner = get(g:, 'asyncrun_runner', {})
let g:asyncrun_runner.test = function('MyRunner')

Then try:

:AsyncRun -mode=term -pos=test ls -la $(VIM_FILEDIR)

When -mode is term and -pos can used to represent runner name.

Runner function has only one argument: opts, it contains the options extracted from :AsyncRun command line, and opts.cmd stores current command.

Another way to create a runner is to simply create a .vim file in the autoload/asyncrun/runner/ folder of your run-time-path (see the examples).

For more information, please visit project wiki: customize runner.

Command Modifier

Command modifiers can be used to change your command before running:

let g:asyncrun_program = get(g:, 'asyncrun_program', {})
let g:asyncrun_program.nice = { opts -> 'nice -5' . opts.cmd }

When you are using:

:AsyncRun -program=nice ls -la

The command ls -la will be changed into nice -5 ls -la.

The -program=msys, -program=wsl are both implemented as a new command modifier it changes command ls into:

c:\windows\sysnative\wsl.exe ls

And replace any thing like $(WSL_FILENAME) and $(WSL_FILEPATH) in your command.

Requirements

Vim 7.4.1829 is minimal version to support async mode. If you are use older versions, g:asyncrun_mode will fall back from 0/async to 1/sync. NeoVim 0.1.4 or later is also supported.

Recommend to use Vim 8.0 or later.

Cooperate with vim-fugitive:

asyncrun.vim can cooperate with vim-fugitive, see here.

Language Tips

More Topics

Don't forget to read the Frequently Asked Questions.

Cooperate with other Plugins

Name Description
asynctasks Introduce vscode's task system to vim (powered by AsyncRun).
vim-fugitive perfect cooperation, asyncrun gets Gfetch/Gpush running in background
errormarker perfect cooperation, errormarker will display the signs on the error or warning lines
airline very well, airline will display status of background jobs
sprint nice plugin who uses asyncrun to provide an IDE's run button to runs your code

See: Cooperate with famous plugins

History

  • 2.9.1 (2021-12-15): extra runners to run command in a tmux, or floaterm window.
  • 2.6.2 (2020-03-08): change runner's argument from string to dict.
  • 2.6.0 (2020-03-07): -post can be used in terminal mode.
  • 2.5.5 (2020-03-07): "-mode=term -pos=tab" obeys "-focus=0" now.
  • 2.5.3 (2020-03-02): new -silent option to prevent open quickfix, add command modifier.
  • 2.5.0 (2020-02-29): refactor, remove useless codes, new command modifier g:asyncrun_program.
  • 2.4.8 (2020-02-21): run with :execute if command is starting with colon.
  • 2.4.7 (2020-02-21): new customizable runners by g:asyncrun_runner, see customize runner.
  • 2.4.0 (2020-02-10): fixed internal terminal issue in msys.
  • 2.3.0 (2020-02-10): new mode aliases, minor issue fix.
  • 2.2.9 (2020-02-10): new terminal mode options: -safe=1, -listed=0 and -reuse.
  • 2.2.6 (2020-02-06): new: parameter -hidden when using -mode=term to set bufhidden to hidden.
  • 2.2.5 (2020-02-05): more safe to start a terminal.
  • 2.2.4 (2020-02-05): exit when starting terminal failed in current window with -pos=curwin.
  • 2.2.3 (2020-02-05): new -program=wsl to run command in wsl (windows 10 only).
  • 2.2.2 (2020-02-05): new -pos=curwin to open terminal in current window.
  • 2.2.1 (2020-01-20): set noreletivenumber for terminal window.
  • 2.2.0 (2020-01-18): new -focus=0 option for -mode=term to prevent focus change.
  • 2.1.9 (2020-01-12): polish -mode=term, omit number and signcolunm in terminal.
  • 2.1.8 (2020-01-11): new options errorformat in asyncrun#run(...).
  • 2.1.4 (2020-01-09): correct command encoding on windows and fixed minor issues.
  • 2.1.0 (2020-01-09): new mode -mode=term to run command in a reusable terminal window.
  • 2.0.8 (2019-04-28): handle tcd (introduced in 8.1.1218). use grepformat when -program=grep.
  • 2.0.7 (2019-01-27): restore g:asyncrun_stdin because rg will break if stdin is pipe.
  • 2.0.6 (2019-01-26): more adaptive to handle stdin and remove 'g:asyncrun_stdin'
  • 2.0.5 (2019-01-14): enable stdin by default on windows (fix cmake stdin warning on windows).
  • 2.0.4 (2019-01-13): new option g:asyncrun_stdin, set to 1 to enable stdin .
  • 2.0.3 (2019-01-04): new macro $VIM_PATHNOEXT (by @PietroPate)
  • 2.0.2 (2018-12-25): new -strip and -append option to control quickfix (by @bennyyip)
  • 2.0.1 (2018-04-29): new option g:asyncrun_save to save files.
  • 2.0.0 (2018-04-27): improve neovim compatability, handle tcd command in neovim.
  • 1.3.27 (2018-04-17): AsyncRun now supports range, try: :%AsyncRun cat
  • 1.3.26 (2018-04-16): new option g:asyncrun_wrapper to enable setup a command prefix
  • 1.3.25 (2018-04-16): handle makeprg/grepprg correctly, accept % and $* macros. close #96 #84 and #35
  • 1.3.24 (2018-04-13): remove trailing ^M on windows.
  • 1.3.23 (2018-04-03): back compatible to vim 7.3, can fall back to mode 1 in old vim.
  • 1.3.22 (2018-03-11): new option g:asyncrun_open to open quickfix window automatically at given height.
  • 1.3.21 (2018-03-02): fixed: float point reltime issues
  • 1.3.20 (2018-02-08): fixed: Incorrect background job status (@antoinemadec)
  • 1.3.19 (2017-12-13): new option g:asyncrun_skip to skip specific autocmd.
  • 1.3.18 (2017-12-12): fixed: windo breaks commands (especially in neovim).
  • 1.3.17 (2017-08-06): fixed: process hang when mode is 5.
  • 1.3.16 (2017-08-05): fixed: g:asyncrun_mode issue (Joel Taylor)
  • 1.3.15 (2017-07-30): fixed: remove trailing new line in neovim.
  • 1.3.14 (2017-07-27): improve asyncrun#get_root(), allow user indicate the rootmarkers
  • 1.3.13 (2017-07-12): new option (-raw) to use raw output (not match with the errorformat).
  • 1.3.12 (2017-06-25): new macro <root> or $(VIM_ROOT) to indicate project root directory.
  • 1.3.11 (2017-05-19): new option (-save=2) to save all modified files.
  • 1.3.10 (2017-05-04): remove trailing ^M in NeoVim 2.0 on windows
  • 1.3.9 (2016-12-23): minor bugs fixed, improve performance and compatibility.
  • 1.3.8 (2016-11-17): new autocmd AsyncRunPre/AsyncRunStart/AsyncRunStop, fixed cmd line window conflict.
  • 1.3.7 (2016-11-13): new option 'g:asyncrun_timer' to prevent gui freeze by massive output.
  • 1.3.6 (2016-11-08): improve performance in quickfix_toggle, fixed small issue in bell ringing.
  • 1.3.5 (2016-11-02): new option "g:asyncrun_auto" to trigger QuickFixCmdPre/QuickFixCmdPost.
  • 1.3.4 (2016-10-28): new option "g:asyncrun_local" to use local value of errorformat rather the global value.
  • 1.3.3 (2016-10-21): prevent job who reads stdin from getting hanging, fixed an issue in fast exiting jobs.
  • 1.3.2 (2016-10-19): new "-post" option to run a vimscript after the job finished
  • 1.3.1 (2016-10-18): fixed few issues of arguments passing in different modes
  • 1.3.0 (2016-10-17): add support to neovim, better CJK characters handling.
  • 1.2.0 (2016-10-16): refactor, correct arguments parsing, cmd options and &makeprg supports
  • 1.1.1 (2016-10-13): use the vim native &shell and &shellcmdflag config to execute commands.
  • 1.1.0 (2016-10-12): quickfix window scroll only if cursor is on the last line
  • 1.0.3 (2016-10-10): reduce quickfix output latency.
  • 1.0.2 (2016-10-09): fixed an issue in replacing macros in parameters.
  • 1.0.1 (2016-10-07): Add a convenient way to toggle quickfix window (asyncrun#quickfix_toggle)
  • 1.0.0 (2016-09-21): can fall back to sync mode to compatible older vim versions.
  • 0.0.3 (2016-09-15): new arguments now accept environment variables wrapped by $(...)
  • 0.0.2 (2016-09-12): some improvements and more documents for a tiny tutorial.
  • 0.0.1 (2016-09-08): improve arguments parsing
  • 0.0.0 (2016-08-24): initial version

Credits

Trying best to provide the most simply and convenience experience in the asynchronous-jobs.

Author: skywind3000 Please vote it if you like it: http://www.vim.org/scripts/script.php?script_id=5431

More Repositories

1

kcp

โšก KCP - A Fast and Reliable ARQ Protocol
C
15,270
star
2

awesome-cheatsheets

่ถ…็บง้€ŸๆŸฅ่กจ - ็ผ–็จ‹่ฏญ่จ€ใ€ๆก†ๆžถๅ’Œๅผ€ๅ‘ๅทฅๅ…ท็š„้€ŸๆŸฅ่กจ๏ผŒๅ•ไธชๆ–‡ไปถๅŒ…ๅซไธ€ๅˆ‡ไฝ ้œ€่ฆ็Ÿฅ้“็š„ไธœ่ฅฟ โšก
Shell
11,094
star
3

ECDICT

Free English to Chinese Dictionary Database
Python
5,922
star
4

preserve-cd

Game Preservation Project
3,654
star
5

z.lua

โšก A new cd command that helps you navigate faster by learning your habits.
Lua
2,979
star
6

mini3d

3D Software Renderer in 700 Lines !!
C
2,173
star
7

RenderHelp

โšก ๅฏ็ผ–็จ‹ๆธฒๆŸ“็ฎก็บฟๅฎž็Žฐ๏ผŒๅธฎๅŠฉๅˆๅญฆ่€…ๅญฆไน ๆธฒๆŸ“
C++
1,333
star
8

vim-quickui

The missing UI extensions for Vim 9 (and NeoVim) !! ๐Ÿ˜Ž
Vim Script
1,094
star
9

vim

Personal Vim Profile
Vim Script
911
star
10

asynctasks.vim

๐Ÿš€ Modern Task System for Project Building, Testing and Deploying !!
Vim Script
910
star
11

vim-init

่ฝป้‡็บง Vim ้…็ฝฎๆก†ๆžถ๏ผŒๅ…จไธญๆ–‡ๆณจ้‡Š
Vim Script
907
star
12

emake

ไฝ ่ง่ฟ‡็š„ๆœ€็ฎ€ๅ•็š„ GCC/CLANG ้กน็›ฎๆž„ๅปบๅทฅๅ…ท๏ผŒๅฎšไน‰ๅผๆž„ๅปบ๏ผŒๆฏ”ๅ‘ฝไปคๅผๆ›ด็ฎ€ๅ•
Python
802
star
13

PyStand

๐Ÿš€ Python Standalone Deploy Environment !!
C++
736
star
14

FastMemcpy

Speed-up over 50% in average vs traditional memcpy in gcc 4.9 or vc2012
C
585
star
15

preserve-iso

็ป็‰ˆ่ฝฏไปถไฟๆŠคๅทฅ็จ‹
580
star
16

avlmini

AVL implementation which is as fast/compact as linux's rbtree
C
347
star
17

quickmenu.vim

A nice customizable popup menu for vim
Vim Script
275
star
18

vim-auto-popmenu

๐Ÿ˜Ž Display the Completion Menu Automantically (next AutoComplPop) !!
Vim Script
271
star
19

gutentags_plus

The right way to use gtags with gutentags
Vim Script
266
star
20

vim-terminal-help

Small changes make vim/nvim's internal terminal great again !!
Vim Script
243
star
21

translator

ๅ‘ฝไปค่กŒ่šๅˆ็ฟป่ฏ‘ๅทฅๅ…ท๏ผŒๆ”ฏๆŒ่ฐทๆญŒ๏ผŒๅฟ…ๅบ”๏ผŒๆœ‰้“๏ผŒ็™พๅบฆ๏ผŒ่ฏ้œธ๏ผŒ360
Python
227
star
22

ECDICT-ultimate

Ultimate ECDICT Database
219
star
23

GONGLUE

ๅ•ๆœบๆธธๆˆๆ”ป็•ฅ็ง˜็ฑ๏ผˆ1580+ ็ฏ‡๏ผ‰
Python
180
star
24

vim-preview

The missing preview window for vim
Vim Script
167
star
25

pixellib

High Quality 2D Graphics Library
C
157
star
26

KanaQuiz

Hiragana/Katakana Speed Reading Quiz in Command Line !! ๐Ÿ˜Ž
Python
147
star
27

images

Static Page
C++
144
star
28

BasicBitmap

Simple and high-performance and platform independent Bitmap class (34% faster than GDI/GDI+, 40% faster than DDraw)
C++
131
star
29

AsyncNet

AsyncNet
C
117
star
30

gobang

Gobang game with artificial intelligence in 900 Lines !!
Python
115
star
31

vim-rt-format

๐Ÿ˜Ž Prettify Current Line on Enter !!
Vim Script
113
star
32

vim-keysound

๐Ÿท Play typewriter sound in Vim when you are typing a letter
Vim Script
112
star
33

Intel2GAS

Convert MSVC Style Inline Assembly to GCC Style Inline Assembly
Python
103
star
34

CloudClip

Your own clipboard in the cloud, copy and paste text with gist between systems !!
Python
79
star
35

googauth

The Python Command-line Reimplementaion of Google Authenticator
Python
74
star
36

LIBLR

Parser Generator for LR(1) and LALR
Python
68
star
37

markpress

Write WordPress in Markdown in Your Favorite Text Editor !! ๐Ÿ˜Ž ๐Ÿ˜Ž
Python
67
star
38

vim-dict

ๆฒกๅŠžๆณ•๏ผŒ่ขซ้€ผ็š„๏ผŒ้‡ๆ–ฐๆ•ด็†ไธ€ไธช่ฏๅ…ธ่กฅๅ…จ็š„ๆ•ฐๆฎๅบ“
Vim Script
56
star
39

terminal

Open Terminal Window to execute command in Windows / Cygwin / Ubuntu / OS X
Python
51
star
40

LeaderF-snippet

Intuitive Way to Use Snippet
Vim Script
46
star
41

nanolib

Cross-Platform Networking Library
C
44
star
42

vim-gpt-commit

๐Ÿš€ Generate git commit message using ChatGPT in Vim (and NeoVim) !!
Python
43
star
43

czmod

๐Ÿš€ Native Module Written in C to Boost z.lua !!
C
42
star
44

collection

ๆฒกๅœฐๆ–นๆ”พ็š„ไปฃ็ ๏ผŒๆ‡’ๅพ—ๅผ€ๆ–ฐ้กน็›ฎไบ†๏ผŒๆ”พ่ฟ™้‡Œๅงใ€‚
Python
40
star
45

atom-shell-commands

Execute user defined shell commands (looking for new maintainers)
JavaScript
36
star
46

vim-navigator

๐Ÿš€ Navigate Your Commands Easily !!
Vim Script
32
star
47

lemma.en

English Lemma Database - Compiled by Referencing British National Corpus
29
star
48

ml

Machine Learning From Scratch
C
28
star
49

memslab

Slab Memory Allocator in Application Layer
C
28
star
50

asyncrun.extra

Extra runners for asyncrun to run your command in Tmux/Gnome-terminal panel, xterm, Floaterm and more.
Vim Script
27
star
51

vim-color-patch

๐ŸŒˆ Load colorscheme patch script automatically !!
Vim Script
25
star
52

zvi

๐Ÿš€ Smallest Vi-clone Text Editor for Windows CLI and SSH session (only 62KB) !!
23
star
53

vim-color-export

๐ŸŒˆ A tool to backport NeoVim colorschemes to Vim !!
Vim Script
20
star
54

QuickNet

UDP Networking Library
C
19
star
55

asmpure

Asmpure is a library written in C for compiling assembly code at run-time
C
16
star
56

docker

Docker Images
Python
16
star
57

VmBasic

ๅŸบไบŽ่™šๆ‹Ÿๆœบ็š„ไปฟ QuickBasic ่ฏญ่จ€
C++
15
star
58

vim-cppman

Read Cppman/Man pages right inside your vim.
Vim Script
15
star
59

language

Language Collection
Python
12
star
60

tcz_cd

Autojump for Total Commander !!
Python
11
star
61

LanguageMark

Native Language Benchmark in Numerous Algorithms
C
9
star
62

abandonware

Abandonware Collection
9
star
63

rogue-clone

A fork of rogue-clone with bug fixes and improvements.
C
8
star
64

vim-proposal

Collection of Proposals for Vim
TypeScript
7
star
65

gosub

Golang Sub-routines for Network Development
Go
7
star
66

winxp-editors

๐Ÿท Text Editors Preservation Project for Windows XP+
Batchfile
7
star
67

cannon

Cross Platform Network Framework
C
6
star
68

shell-scripts

ๅธธ็”จ็š„ๅ‘ฝไปค่กŒ่„šๆœฌๅˆ้›†๏ผŒ่ฎฉไฝ ๆฏๅคฉ็š„ๅ‘ฝไปค่กŒ็”Ÿๆดปๆ›ดๅŠ ้ซ˜ๆ•ˆ
Shell
6
star
69

crtzero

Zero Dependent on CRT (libc)
C
6
star
70

pyp2p

Python P2P Framework
Python
6
star
71

SimdVector

Cross Platform SIMD Vector Math In A Single Header File (SimdVector.h)
C++
5
star
72

support

Win32 Command Line Tools for Development
Python
5
star
73

treasure

Single-file MIT Licensed C/C++ Portable Libraries
C
4
star
74

asyncredis

Async Redis Client for Python
Python
3
star
75

skywind

Personal Blog
HTML
3
star
76

directx9-samples

samples
C++
3
star
77

gfx

Just Another Toy yet !!
C++
3
star
78

script

Script I am using
Python
3
star
79

colors-from-neovim.vim

๐ŸŒˆ Backported NeoVim Colors for Vim
Vim Script
3
star
80

ones

One single file MIT licensed C/C++ Libraries
2
star
81

asclib

Basic Java Network Lib
Java
2
star
82

transmod

Automatically exported from code.google.com/p/transmod
C
2
star
83

toys

My PyQt Desktop Toys
Python
2
star
84

rust

Rust Learning Repository
1
star
85

vile

Vile the vi-clone text editor
C
1
star
86

xvi

A portable multi-file text editor and the smallest full-function vi clone
C
1
star
87

emacs

Personal Emacs Profile
Emacs Lisp
1
star
88

cmake-scratch

Cmake Templates
CMake
1
star