asyncrun.vim

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

MIT License

Downloads
138
Stars
1.9K
Committers
22

Bot releases are visible (Hide)

asyncrun.vim - 20240726 - v2.13.1 Latest Release

Published by skywind3000 3 months ago

  • asyncrun#get_root(0) returns current root
asyncrun.vim - 20240702 - v2.13.0

Published by skywind3000 4 months ago

  • asyncrun#get_root() now accepts buffer number, if you pass an integer in the first argument, it will be interpreted as a buffer number.

This will display the root of current buffer:

:echo asyncrun#get_root(bufnr('%'))

as well as:

:echo asyncrun#get_root('%')
asyncrun.vim - 20240523 - v2.12.9

Published by skywind3000 5 months ago

  • fixed shellslash issue in NeoVim.
asyncrun.vim - 20240522 - v2.12.8

Published by skywind3000 5 months ago

  • Force to use "cmd.exe" as g:asyncrun_shell on Windows.
asyncrun.vim - 20240514 - v2.12.6

Published by skywind3000 5 months ago

  • Update script_write() to write files silently to avoid displaying unnecessary messages.
asyncrun.vim - 20240323 - v2.12.5

Published by skywind3000 7 months ago

  • set g:asyncrun_mode to 1 during creating a terminal buffer and clear it to 0 after buffer has been created.
  • script triggered by the #TerminalOpen or #TermOpen autocmd can use it to detect if this terminal buffer is created by asyncrun.
asyncrun.vim - 20240220 - v2.12.4

Published by skywind3000 8 months ago

new g:asyncrun_rooter hook for root detection:

  • each item in the g:asyncrun_rooter dictionary is a function pointer (or name).
  • each function will be called to detect current buffer's root directory, until find one valid result.
  • returns empty string to skip, see the example
let g:asyncrun_rooter = get(g:, 'asyncrun_rooter', {})
function! g:asyncrun_rooter.mydetect()
    if unable_to_detect
        return ''
    endif
    return '/path/to/root'
endfunc
asyncrun.vim - 20240216 - v2.12.3

Published by skywind3000 8 months ago

  • Added handling for fugitive buffers in asyncrun#fullname() function
asyncrun.vim - 20231001 - v2.12.2

Published by skywind3000 about 1 year ago

  • accept AsyncRun :!!command to start gui programs.
  • minor issues fixed.
asyncrun.vim - 20230920 - v2.11.23

Published by skywind3000 about 1 year ago

  • added try/catch for Ex commands (starting with colon), eg. :AsyncRun :echo 123 and display exception if failed.
  • fixed minor issues.
asyncrun.vim - 20230821 - v2.11.20

Published by skywind3000 about 1 year ago

  • new api g:asyncrun#current_root() can return current root directory.
asyncrun.vim - 20230803 - v2.11.19

Published by skywind3000 about 1 year ago

  • new -init=script option to run a init script for terminal task after successfully opening the terminal window:
:AsyncRun -mode=term -pos=right -init=setlocal\ ft=myterminit   bash
  • new -ft=filetype option to set filetype for a terminal buffer:
:AsyncRun -mode=term -pos=right -ft=myterminit   bash
asyncrun.vim - 20230302 - v2.11.16

Published by skywind3000 over 1 year ago

  • Strip message even if process fails
asyncrun.vim - 20230118 - v2.11.15

Published by skywind3000 almost 2 years ago

  • new option -runner=xxx can work as an alias to -mode=term -pos=xxx.
  • polish external function calling
asyncrun.vim - 20221129 - v2.11.14

Published by skywind3000 almost 2 years ago

  • terminal: accept -scroll=0 option to keep consistency.
asyncrun.vim - 20221129 - v2.11.13

Published by skywind3000 almost 2 years ago

Changes:

  • terminal: only reuse terminal window created by asyncrun, prevent side-effect to other terminal plugins.
  • terminal: simplify terminal reusable check routine.
  • terminal: enable reuse by default for split terminal (can be disabled by -reuse=0).
  • terminal: enable autoscroll for terminal buffers in a non-active window (-focus=0).

try this:

:AsyncRun -mode=term -pos=bottom -focus=0 -rows=5  ls -la /

You will see the autoscroll is enabled in the terminal window.

asyncrun.vim - 20221127 - v2.11.9

Published by skywind3000 almost 2 years ago

  • vim-7.4.1829 compliance
  • add noautocmd prefix to cd command for temporary working directory changing.
  • silent error message when directory doesn't exist.
asyncrun.vim - 20221121 - v2.11.6

Published by skywind3000 almost 2 years ago

  • terminal: polish terminal buffer name generation.
  • terminal: enable safe-argument-passing mode for vim-8.2 and above.
  • remove unnecessary messages.
asyncrun.vim - 20221120 - v2.11.4

Published by skywind3000 almost 2 years ago

  • terminal: initialize a proper terminal name for vim-8.2 and above
  • terminal: wipe previous finished terminal buffer when '-reuse' is presented
asyncrun.vim - 20221119 - v2.11.3

Published by skywind3000 almost 2 years ago

  • new option g:asyncrun_term_wipe, set to non-zero to change the &bufhidden of terminal buffer to 'wipe' when command finished.
  • the default value of g:asyncrun_term_wipe is 1.