Skip to content

Commit 377c7ab

Browse files
author
skywind3000
committed
2.6.0:
- change: "-post=xxx" is available in terminal mode - new: "-pos=hide" in terminal mode - new: "-name=abc" to specify a name for terminal task - new: `g:asyncrun_name` to get terminal task name.
1 parent e347678 commit 377c7ab

File tree

3 files changed

+165
-136
lines changed

3 files changed

+165
-136
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Remember to open vim's quickfix window by `:copen` (or setting `g:asyncrun_open
5050
- [Project Root](#project-root)
5151
- [Running modes](#running-modes)
5252
- [Internal Terminal](#internal-terminal)
53+
- [Terminal Name](#terminal-name)
5354
- [Quickfix window](#quickfix-window)
5455
- [Range support](#range-support)
5556
- [Customize Runner](#customize-runner)
@@ -282,6 +283,7 @@ AsyncRun is capable to run commands in Vim/NeoVim's internal terminal with the `
282283
- `-pos=bottom`: open the terminal below the current window.
283284
- `-pos=left`: open the terminal on the left side.
284285
- `-pos=right`: open the terminal on the right side.
286+
- `-pos=hide`: don't open a window, run in background.
285287
- `-pos=external`: use an external terminal (windows only).
286288

287289
Examples:
@@ -296,6 +298,15 @@ Examples:
296298

297299
When using a split (`-pos` is one of `top`, `bottom`, `left` and `right`), AsyncRun will firstly reuse a finished previous terminal window if it exists, if not, AsyncRun will create a new terminal window in given position.
298300

301+
### Terminal Name
302+
303+
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`:
304+
305+
```VimL
306+
:AsyncRun -mode=term -pos=hide -name=123 -post=echo\ g:asyncrun_name ls -la
307+
```
308+
309+
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.
299310

300311
### Quickfix window
301312

@@ -422,6 +433,7 @@ See: [Cooperate with famous plugins](https://github.com/skywind3000/asyncrun.vim
422433

423434
## History
424435

436+
- 2.6.0 (2020-03-07): `-post` can be used in terminal mode.
425437
- 2.5.5 (2020-03-07): "-mode=term -pos=tab" obeys "-focus=0" now.
426438
- 2.5.3 (2020-03-02): new `-silent` option to prevent open quickfix, add [command modifier](https://github.com/skywind3000/asyncrun.vim/wiki/Command-Modifier).
427439
- 2.5.0 (2020-02-29): refactor, remove useless codes, new command modifier `g:asyncrun_program`.

doc/asyncrun.md

Lines changed: 11 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ AsyncRun is capable to run commands in Vim/NeoVim's internal terminal with the `
260260
- `-pos=bottom`: open the terminal below the current window.
261261
- `-pos=left`: open the terminal on the left side.
262262
- `-pos=right`: open the terminal on the right side.
263+
- `-pos=hide`: don't open a window, run in background.
263264
- `-pos=external`: use an external terminal (windows only).
264265

265266
Examples:
@@ -274,6 +275,16 @@ Examples:
274275

275276
When using a split (`-pos` is one of `top`, `bottom`, `left` and `right`), AsyncRun will firstly reuse a finished previous terminal window if it exists, if not, AsyncRun will create a new terminal window in given position.
276277

278+
### Terminal Name
279+
280+
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`:
281+
282+
```VimL
283+
:AsyncRun -mode=term -pos=hide -name=123 -post=echo\ g:asyncrun_name ls -la
284+
```
285+
286+
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.
287+
277288

278289
### Quickfix window
279290

@@ -397,75 +408,6 @@ Don't forget to read the [Frequently Asked Questions](https://github.com/skywind
397408

398409
See: [Cooperate with famous plugins](https://github.com/skywind3000/asyncrun.vim/wiki/Cooperate-with-famous-plugins)
399410

400-
## History
401-
402-
- 2.5.3 (2020-03-02): new `-silent` option to prevent open quickfix, add [command modifier](https://github.com/skywind3000/asyncrun.vim/wiki/Command-Modifier).
403-
- 2.5.0 (2020-02-29): refactor, remove useless codes, new command modifier `g:asyncrun_program`.
404-
- 2.4.8 (2020-02-21): run with `:execute` if command is starting with colon.
405-
- 2.4.7 (2020-02-21): new customizable runners by `g:asyncrun_runner`, see [customize runner](https://github.com/skywind3000/asyncrun.vim/wiki/Customize-Runner).
406-
- 2.4.0 (2020-02-10): fixed internal terminal issue in msys.
407-
- 2.3.0 (2020-02-10): new mode aliases, minor issue fix.
408-
- 2.2.9 (2020-02-10): new terminal mode options: `-safe=1`, `-listed=0` and `-reuse`.
409-
- 2.2.6 (2020-02-06): new: parameter `-hidden` when using `-mode=term` to set `bufhidden` to `hidden`.
410-
- 2.2.5 (2020-02-05): more safe to start a terminal.
411-
- 2.2.4 (2020-02-05): exit when starting terminal failed in current window with `-pos=curwin`.
412-
- 2.2.3 (2020-02-05): new `-program=wsl` to run command in wsl (windows 10 only).
413-
- 2.2.2 (2020-02-05): new `-pos=curwin` to open terminal in current window.
414-
- 2.2.1 (2020-01-20): set noreletivenumber for terminal window.
415-
- 2.2.0 (2020-01-18): new `-focus=0` option for `-mode=term` to prevent focus change.
416-
- 2.1.9 (2020-01-12): polish `-mode=term`, omit `number` and `signcolunm` in terminal.
417-
- 2.1.8 (2020-01-11): new options `errorformat` in `asyncrun#run(...)`.
418-
- 2.1.4 (2020-01-09): correct command encoding on windows and fixed minor issues.
419-
- 2.1.0 (2020-01-09): new mode `-mode=term` to run command in a reusable terminal window.
420-
- 2.0.8 (2019-04-28): handle `tcd` (introduced in 8.1.1218). use grepformat when `-program=grep`.
421-
- 2.0.7 (2019-01-27): restore `g:asyncrun_stdin` because rg will break if stdin is pipe.
422-
- 2.0.6 (2019-01-26): more adaptive to handle stdin and remove 'g:asyncrun_stdin'
423-
- 2.0.5 (2019-01-14): enable stdin by default on windows (fix cmake stdin warning on windows).
424-
- 2.0.4 (2019-01-13): new option `g:asyncrun_stdin`, set to 1 to enable stdin .
425-
- 2.0.3 (2019-01-04): new macro `$VIM_PATHNOEXT` (by @PietroPate)
426-
- 2.0.2 (2018-12-25): new `-strip` and `-append` option to control quickfix (by @bennyyip)
427-
- 2.0.1 (2018-04-29): new option `g:asyncrun_save` to save files.
428-
- 2.0.0 (2018-04-27): improve neovim compatability, handle `tcd` command in neovim.
429-
- 1.3.27 (2018-04-17): AsyncRun now supports range, try: `:%AsyncRun cat`
430-
- 1.3.26 (2018-04-16): new option `g:asyncrun_wrapper` to enable setup a command prefix
431-
- 1.3.25 (2018-04-16): handle makeprg/grepprg correctly, accept `%` and `$*` macros. close [#96](https://github.com/skywind3000/asyncrun.vim/issues/96) [#84](https://github.com/skywind3000/asyncrun.vim/issues/84) and [#35](https://github.com/skywind3000/asyncrun.vim/issues/35)
432-
- 1.3.24 (2018-04-13): remove trailing ^M on windows.
433-
- 1.3.23 (2018-04-03): back compatible to vim 7.3, can fall back to mode 1 in old vim.
434-
- 1.3.22 (2018-03-11): new option `g:asyncrun_open` to open quickfix window automatically at given height.
435-
- 1.3.21 (2018-03-02): fixed: float point reltime issues
436-
- 1.3.20 (2018-02-08): fixed: [Incorrect background job status](https://github.com/skywind3000/asyncrun.vim/issues/25) (@antoinemadec)
437-
- 1.3.19 (2017-12-13): new option `g:asyncrun_skip` to skip specific autocmd.
438-
- 1.3.18 (2017-12-12): fixed: windo breaks commands (especially in neovim).
439-
- 1.3.17 (2017-08-06): fixed: process hang when mode is 5.
440-
- 1.3.16 (2017-08-05): fixed: g:asyncrun_mode issue (Joel Taylor)
441-
- 1.3.15 (2017-07-30): fixed: remove trailing new line in neovim.
442-
- 1.3.14 (2017-07-27): improve asyncrun#get_root(), allow user indicate the rootmarkers
443-
- 1.3.13 (2017-07-12): new option (-raw) to use raw output (not match with the errorformat).
444-
- 1.3.12 (2017-06-25): new macro `<root>` or $(VIM_ROOT) to indicate project root directory.
445-
- 1.3.11 (2017-05-19): new option (-save=2) to save all modified files.
446-
- 1.3.10 (2017-05-04): remove trailing `^M` in NeoVim 2.0 on windows
447-
- 1.3.9 (2016-12-23): minor bugs fixed, improve performance and compatibility.
448-
- 1.3.8 (2016-11-17): new autocmd AsyncRunPre/AsyncRunStart/AsyncRunStop, fixed cmd line window conflict.
449-
- 1.3.7 (2016-11-13): new option 'g:asyncrun_timer' to prevent gui freeze by massive output.
450-
- 1.3.6 (2016-11-08): improve performance in quickfix_toggle, fixed small issue in bell ringing.
451-
- 1.3.5 (2016-11-02): new option "g:asyncrun_auto" to trigger QuickFixCmdPre/QuickFixCmdPost.
452-
- 1.3.4 (2016-10-28): new option "g:asyncrun_local" to use local value of errorformat rather the global value.
453-
- 1.3.3 (2016-10-21): prevent job who reads stdin from getting hanging, fixed an issue in fast exiting jobs.
454-
- 1.3.2 (2016-10-19): new "-post" option to run a vimscript after the job finished
455-
- 1.3.1 (2016-10-18): fixed few issues of arguments passing in different modes
456-
- 1.3.0 (2016-10-17): add support to neovim, better CJK characters handling.
457-
- 1.2.0 (2016-10-16): refactor, correct arguments parsing, cmd options and &makeprg supports
458-
- 1.1.1 (2016-10-13): use the vim native &shell and &shellcmdflag config to execute commands.
459-
- 1.1.0 (2016-10-12): quickfix window scroll only if cursor is on the last line
460-
- 1.0.3 (2016-10-10): reduce quickfix output latency.
461-
- 1.0.2 (2016-10-09): fixed an issue in replacing macros in parameters.
462-
- 1.0.1 (2016-10-07): Add a convenient way to toggle quickfix window (asyncrun#quickfix_toggle)
463-
- 1.0.0 (2016-09-21): can fall back to sync mode to compatible older vim versions.
464-
- 0.0.3 (2016-09-15): new arguments now accept environment variables wrapped by $(...)
465-
- 0.0.2 (2016-09-12): some improvements and more documents for a tiny tutorial.
466-
- 0.0.1 (2016-09-08): improve arguments parsing
467-
- 0.0.0 (2016-08-24): initial version
468-
469411
## Credits
470412

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

0 commit comments

Comments
 (0)