Coder Social home page Coder Social logo

skywind3000 / asyncrun.vim Goto Github PK

View Code? Open in Web Editor NEW
1.8K 1.8K 107.0 1.38 MB

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

Home Page: https://www.vim.org/scripts/script.php?script_id=5431

License: MIT License

Lua 2.26% Vim Script 97.74%
asynchronous asyncrun build cmake dispatch make neomake neovim neovim-plugin neovim-plugins nvim terminal vim vim-plugin vim-plugins vim8

asyncrun.vim's People

Contributors

bennyyip avatar eliasdaler avatar etrnal70 avatar fievel avatar grodzik avatar idbrii avatar js-zheng avatar kaihowl avatar lu5je0 avatar meijieru avatar n0bra1n3r avatar pietropate avatar qujihan avatar skyblueee avatar skywind3000 avatar tankorsmash avatar tomtomjhj avatar wookayin avatar yungen-lu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asyncrun.vim's Issues

程序结果没有输出到 quickfix?

我好像并没有什么 vim 配置上的调整,之前还是没问题的,但是 AsyncRun 突然不能将结果输出到 quickfix 中。

terminal 中运行,应当 print 一些信息:

user number: 943
item number: 1650
density:  0.05141489122401106
rating records: 79999
rating scale:  [1, 2, 3, 4, 5]
global average rating:  3.52833160415
MAE: 0.8502
RMSE: 1.0630

实际 vim 中 AsyncRun 运行:

|| [python 'average_filling.py']
|| [Finished in 10 seconds]

不知道是否有些排查的方法?

How to make asyncrun use Elixir `exunit` compiler to display failures like in Dispatch?

First, I wanted to say thank you for work. I have the feeling asyncrun will be a plugin I will use a lot. Kudos for neovim support 😄 .

I have read your FAQ about how to process the content in quickfix but I am not sure how to tell asyncrun to use the exunit compiler.

Screenshot:
image

See elixir-editors/vim-elixir#76 explains how it was fixed with vim-test + Dispatch.

a screenshot with Dispatch:
image

I am also wondering how Tim Pope does to have some syntax highlighting in color here but that's for another issue

Provide example setup to get async netrw-write for remotes even when using `:w`

When editing a remote file, saving the file with :w is blocking the editor until the file is saved to the remote. This can vary dependent on file size and remote connection.

Would it be possible to offer a setup in the wiki similar to the fugitive setting of :Gpush to make this non-blocking?

netrw-write acts on the builtin write command :write via the autocommand events BufWriteCmd and FileWriteCmd as can be seen in $VIMRUNTIME/plugin/netrwPlugin.vim:

 au BufWriteCmd  ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://*          exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
 au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://*          exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))

Opening error file in Clist not works in neovim

In neovim, when we use AsyncRun to GNU make, errors in the clist are not using the full path from the project root. The same works in vim 8.0

Steps to repro:

  • Clone the repo

https://github.com/Mariappan/testrepo

When using vim 8.0 and open the file l1/src/main.c and giving this command: ":AsyncRun make"

|| gcc main.c -O0 -g -Wall -Werror -o test∙
|| main.c: In function ‘main’:∙
l1/src/main.c|7 col 5| error: expected ‘;’ before ‘return’∙
|| return 0;∙
|| ^∙
l1/src/main.c|8 col 1| error: control reaches end of non-void function [-Werror=return-type]∙
|| }∙
|| ^∙
|| cc1: all warnings being treated as errors∙

When using neovim 0.1.7 and open the file l1/src/main.c and giving this command: ":AsyncRun make"
|| gcc main.c -O0 -g -Wall -Werror -o test∙
||
|| main.c: In function ‘main’:∙
||
main.c|7 col 5| error: expected ‘;’ before ‘return’∙
|| return 0;∙
|| ^∙
||∙
main.c|8 col 1| error: control reaches end of non-void function [-Werror=return-type]∙
|| }∙

run exe with printf error

include <stdio.h>

int main(int argc, const char *argv[])
{
printf("a");
printf("b");
return 0;
}
Async gcc % -o a.exe
Async a.exe

Error detected while processing function 12_AsyncRun_Job_OnClose:
line 10:
E117:Unknown function: AsyncRun_Job_OnCallback
...
...
...

quick fix问题

插件安装成功,使用gcc可以生成二进制文件,但是没有quick fix窗口展示,请问这是什么问题?

Incorrect background job status

Sometimes AsyncRun gets stuck thinking the background job is still running and won't allow further runs of the job.

ERROR: background job is still running

Verified that the process ran isn't running. AsyncStop doesn't seem to help.

MacVim 8.0.134

Option to turn off displaying the command that is executed

Hi,

Currently when :AsyncRun command, it will show

[command]
...output...
[Finished in # seconds]

Because my use case involves username and password in the command, obviously having them displayed in plain text isn't good.

Is there a way to turn off displaying [command] and [Finished in #seconds] in quickfix window to only show the output?

Thanks

Trigger autocommand QuickFixCmdPost

Hi,

thanks for the great plugin. Works really fine for me. Except one things: I run make through asyncrun and I additionally use the plugin errormarker (https://github.com/vim-scripts/errormarker.vim) that highlights compiler errors and warnings after a make using the QuickFixCmdPost. This does not work for asyncrun. Is it possible to add a doautocmd after asyncrun detects the exit of the called program? For now I added the following line as last command in AsyncRun_Job_OnFinish:

silent doautocmd QuickFixCmdPost make

The hard coding of make is really silly but I don't know how it could be implemented in a intelligent way. Any Ideas?

Automatically manipulate the quickfix window?

First of all, this is a nice plugin. But how about opening the quickfix window automatically when AsyncRun? I mean, instead of explicitly opening the quickfix by ourselves, the plugin could do this when necessary.

Running commands in the right environment

Hi!

First off, thanks for this plugin, it's fun to play with.

I'm trying to use it to run my Xcode builds from Xcode's command line tool and it works for the simplest case but starts to fail when I try to set environment variables and such before the command. Get errors saying "command not found" or even sometimes it will just hang until I interrupt it in vim.

My best guess is that commands aren't being run in the same user/shell/environment I'm operating in. Is that true? It's a bit hard to tell from reading the code (I'm new to vimscript)

For reference, I'm trying to run commands like these:

set -o pipefail;NSUnbufferedIO=YESxcrun xcodebuild build -project './TheoryDrills.xcodeproj' -scheme 'TheoryDrills' -destination "platform=iOS Simulator,name=iPhone 6s" | xcpretty --color

Where the simpler case does work:

xcodebuild -project './TheoryDrills.xcodeproj' -scheme 'TheoryDrills' -destination "platform=iOS Simulator,name=iPhone 6s" | xcpretty --color

Any tips/clues/help you could give would be awesome.

Also, in case it's helpful, this is the plugin which generates the command: https://github.com/gfontenot/vim-xcode/blob/master/plugin/xcode.vim#L132-L135. I'm trying to use AsyncRun as the runner.

Can this plugin run functions defined in .vimrc execute asynchronously?

For example, I have this function:

func! CompileCppAndRun()
"silent w
"silent make
execute "copen"
if (line('$') == 1 && getline(1) == '')
silent execute ":cclose"
let cexec = "". "%:p:r "
silent execute "!clear"
silent execute "!" . "xterm " . "-e " . "cb_console_runner " . cexec
endif

endfunc

This is a function that compiles c++ program, executes if compiled or opens quickfix if there are compile errors.

So, can AsyncRun call this function?

save only saves current file

I've just switched to this from using :make and waiting. I used to have the autowrite option, so when I invoked make it would save any changed buffers. Using AsyncRun -save only saves the current buffer.
This seems easy enough to fix - I've changed the 'silent update' to 'silent wall' locally.

Avoiding too many jobs at once

I'm working on this plugin where it calls another program asynchronously on every hit of a keyboard key. However, for obvious reasons, I'm getting ERROR: background job is still running.

I see two solutions

  1. Not asyncrun.vim related: how to add a delay between key hit (still ongoing research, probably I'll have to check timestamps etc)
  2. asyncrun.vim related: trying to do an AsyncStop! before every AsyncStart!, that way when the keys stop being pressed quickly, the last AsyncStart! will continue just fine (drawback is that the external program will probably be executed many times afaik).

On the solution 2, I'm trying this:

function! StopCommunications()
  exec ":AsyncStop!"
endfunction

function! StartCommunications()
  exec ":AsyncStop!"
  exec ":AsyncRun! my_program"
  " ...
endfunction

augroup MyPlugin
  autocmd!

  autocmd User AsyncRunPre :call StopCommunications()
  autocmd CursorMoved  * :call StartCommunications()
augroup END

Even with the AsyncStop! being called, I still get ERROR: background job is still running, which leads me to believe that I don't know how AsyncStop! works.

Document g:asyncrun_timer or default to -1

I found the delay in updating the quickfix list annoying so in my .vimrc I do

" Update :AsyncRun output as it is ready rather than waiting on timer.
let g:asyncrun_timer = -1

The code makes it look like this is supposed to work, so I'm wondering why it isn't the default or at least documented. It seems to work for me... (famous last words, I know)

能否增加对 ex command ranges 的支持

如果可以直接使用 :%AsyncRun 来运行当前 buffer 区里的命令,这样对于需要修改重复运行的命令的方便多了,毕竟在 vim 里比在 shell 里容易编辑命令 :)

asyncrun not playing well with command buffer

Hi,
asyncrun doesn't work well when invoked from the command window (I use nnoremap : q:i).
If I try to open the command window again after invoking a longer AsynRun I get lots of error messages, rendering the command window unusable until the run is finished.

(Question) Format asyncrun's output

When I'm running a python script, all output lines in the quickfix window are prefaced with ||, i.e.

|| line 1
|| line 2

Can I somehow get rid of these lines? I searched the FAQ but could not find a solution.
Thanks in advance!

[Question] Run multiple commands

Hi @skywind3000
With vim-dispatch i can run multiple processes which will be started in separate tmux panes
Is it possible to implement such behaviour with asyncrun?
So for example i want to start http-server, start js/sass/less etc. preprocessor, run tests

Also it would be very great to see which processes are currently running in split window and to make some actions with those processes. For example we have 3 processes:

1 http-server
2 gulp
3 tests

Each one of them you can stop, restart, open quickfix window etc.

Feel free to close this issue if it doesn't fit the purpose of your plugin
Thank you for your work!

E118 and cxpr [] by default

Hello,
First of all, great plugin!

Two quick question:

  1. When I run a command via AsyncRun, I get this error:

E118: Too many arguments for function: setqflist

Everything works correctly though. So I am not sure why I get this error.

  1. Would it be possible to clear out the quick fix list by default the next time I run an AsyncRun command? Right now, I have to do this manually via typing:

:cexpr []

If this can happen, everytime I run a command, that would be convenient.

Keeps the logs of multiple asyncrun command output

Every time a new command is run, the quickfix window is flushed and the output from the previous command will gone. Is there a way to keep all the logs? User can use some explicit command to clear it when he really want to do that.

Missing expansions for makeprg and grepprg

Summary: I have some makeprg's that use vim % expansions. I want both :make and :AsyncRun to work consistently. As such I want to continue to use the % style macros. I would like for asyncrun.vim to support makeprg and grepprg that contain % expansions.

When I use :AsyncRun -program=make, I expect the same output as :make, but instead I get, for example package not found %:h. This is because asyncrun#run does not expand % macros.

I have found a partial solution to the same general problem in timbertson/vim-background-make@404905f

I have also locally applied a less complete patch as follows, which covers only my use case (no escaped expansions in my makeprgs), that could also be used as a possible approach:
https://gist.github.com/raggi/3bcbb18183be138f3b24718891921d9b

An example of a makeprg I would like to work:

setlocal makeprg=go\ build\ ./%:h;echo\ package\ %:h;echo;go\ test\ ./%:h

And the corresponding errorformat, demonstrating usage:

setlocal errorformat=
      \%E%f:%l::%tarning:\ %m,
      \%E%f:%l:%c:%tarning:\ %m,
      \%E%f:%l::%trror:\ %m,
      \%E%f:%l:%c:%trror:\ %m,
      \%E%f:%l:\ %m,
      \%Dpackage\ %f,
      \%E---\ FAIL:\ %m,
      \%C%f:%l:\ %m

If you would like me to prepare a patch, let me know what your preferred approach will be, and I will add this to my TODO list.

Thanks!

ZSH shell

Hi, Is this plugin able to run command in my zsh shell with aliases I have in zshrc?

Every job fails with 'No such file or directory'

Hi,

I'm running the plugin in the latest vim (built from the git repository with all the necessary features). Yet, all calls to AsyncRun return immediately, and the quickfix list looks like this:

|| ["grep", "-R", "unsigned", "."]
|| executing job failed: No such file or directory
|| [Finished in 0 seconds with code 122]

Not sure what's going on.

ANSI colors not currently supported

If I do:

 :Asyncrun! echo "\e[32mHello World\e[0m"

I get this:

 || ["echo", ""\e[32mHello", "World\e[0m""]
 || "\e[32mHello World\e[0m"
 || [Finished in 0 seconds]

Where "Hello World" is not colored.

Wishlist: g:asynrun_start callback

I would like to change my status line color to indicate the status of the async job:

  • green when it's successful
  • red when it failed
  • purple when it's still running

I can do the first two from the g:asyncrun_exit callback. To do the third, I have to overwrite the :AsyncRun command, which is cumbersome to do, since plugins are sourced after my .vimrc.

What do you think about adding a g:asyncrun_start setting, with a script to be executed right before a job is started?

与 airline 协同时,报 Invalid expression 错误

####问题
在 airline 中加入 let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}']) 后,就立马报错,不知原因

####相关代码

  • airline配置
let g:airline#extensions#syntastic#enabled = 1
 let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'

" for asyncrun.vim
let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}']) 
  • 插件配置
call plug#begin('~/.vim/plugged')
  2 
  3 Plug 'https://github.com/kien/ctrlp.vim'
  4 
  5 Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
  6 
  7 Plug 'https://github.com/vim-airline/vim-airline'
  8 
  9 Plug 'https://github.com/vim-syntastic/syntastic'
 10 
 11 Plug 'https://github.com/skywind3000/asyncrun.vim'
 12 
 13 for f in split(glob('~/.vim/confs/_plugins/*.vim'), '\n')
 14     exe 'source' f                                                                                      
 15 endfor
 16 
 17 call plug#end()

####报错信息

vi plugins.vim 
Error detected while processing /home/ubuntu/.vim/confs/_plugins/vim-airline.vim:
line    7:
E117: Unknown function: airline#section#create_right
E15: Invalid expression: airline#section#create_right(['%{g:asyncrun_status}'])
Press ENTER or type command to continue

####环境

  • vim
vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:39:32)
Included patches: 1-52
Modified by [email protected]
Compiled by buildd@
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            -ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl    -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions 
  • 系统环境
uname -a
Linux VM-54-125-ubuntu 3.13.0-86-generic #131-Ubuntu SMP Thu May 12 23:33:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Usage with a debugger

Is it possible to add a debugger, run a test async, and then pop into a debug session when the debugger is reached?

Right now, the only way I can get this to work is to set the mode to either make or :!. When I run with async mode, it'll act like it wants to pop into a debug session, but will continue past it.

Problem getting asyncrun to use same $PATH as vim

The asyncrun command does not use the same $PATH as vim. In my shell:

$ echo $PATH
/Users/bsweeney/ebi/rnacentral-web/.direnv/python-2.7.10/bin:...

Then in vim:

:echo $PATH

produces:

/Users/bsweeney/ebi/rnacentral-web/.direnv/python-2.7.10/bin:..

but:

:AsyncRun echo "$PATH"

produces

/usr/local/opt/coreutils/libexec/gnubin:..

I suspect this is because I use direnv to set my path depending upon what directory I am in. I'm not sure how to either get the shell asyncrun uses to respect this, or how to pass PATH to the command. Is it possible?

Output not captured in Quickfix for python scripts

Output of python scripts is not displayed in the Quickfix window.

I have the following in a test.py file:

# File: test.py
print('Hello world!')

If I run :AsyncRun python test.py the Quickfix window does not display the message. It simply shows:

|| [python test.py]
|| 
|| [Finished in 0 seconds]

But if I execute :AsyncRun python -c 'print("Hello world!")' I correctly get:

|| [python -c 'print("Hello world!")']
|| Hello world!
|| 
|| [Finished in 0 seconds]

In bash, for example, it works fine. If I have a file test.sh with:

# File: test.sh
echo 'Hello world!'

and execute :AsyncRun bash test.sh I get:

|| [bash test.sh]
|| Hello world!
|| 
|| [Finished in 0 seconds]

What am I missing here? Is there a problem with python output?

关于使用%<加文件扩展名出错

你好!AsyncRun非常好用!!点赞!之前我一直都是用VimShell,感觉速度上还是不够快,虽然也可以异步进行。
我主要用Vim来写Markdown,然后用Pandoc来转换成为Tex或直接输出PDF。我在_vimrc中加入了

nnoremap <silent> <Leader>ppd :AsyncRun pandoc --output %<.pdf %:p <CR>

但是由于在%<后面出现了.pdf,AsyncRun就会直接认为是%<.pdf这一个文本。请问如何才能解决这个问题?谢谢

How to stay in current window after asyncrun finishes?

I remember there was this function to customize whether to jump to the quickfix window when asyncrun finishes, but I can't find it in the document now, wonder if there is still some way to customize this behavior?

Put it simple, I just want the quickfix to be open but remain my current editing window instead of jumping to the quickfix window.

g:asyncrun_status with airline always shows success

Hi @skywind3000
I added g:asyncrun_status to airline to make it show the status of asyncrun
let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}'])

But it always shows success even when the result of command execution is error
I recorded the issue with asciinema https://asciinema.org/a/a4ksqp8enp5tx29uyoczy7f7q

So first I run two commands with :AsyncRun that return errors
After that I run the same two commands in NeoVim terminal just to show the actual output.

I'm using NVIM v0.1.6-175-g7246750

Thank you!

Mistake in readme.

'%>' should be '%<' in "Macro '%' stands for filename and '%>' represents filename without extension."

I forked and was about to submit a pull request, but changing one line seems to have resulted in 188 lines of whitespace changes.

Problem with grep

I haven't managed to find some time to track down the problem myself but sometimes the results get added to the quickfix list as unstructured entries, as if efm isn't set. I've attached a minimal vimrc, here's the steps to (hopefully) reproduce the issue:

  • Grep <TERM>
  • :copen
  • The entries are correctly formatted
  • Open the first result
  • Grep <TERM>
  • The entries are not formatted anymore
set nocompatible
call plug#begin('~/.vim/bundle')
Plug 'skywind3000/asyncrun.vim'
call plug#end()
let &grepprg='ag --vimgrep -- $*'
let grepformat='%f:%l:%c:%m'
command! -nargs=* Grep execute 'AsyncRun! -program=grep "'.escape(<q-args>, "|\%#'\ \"").'" .'

Does not work with Powershell in Windows

When a different shell is configured on Windows (for example, Powershell), some of the shell power is lost using the .cmd approach.

https://github.com/skywind3000/asyncrun.vim/blob/master/plugin/asyncrun.vim#L582

let l:tmp = fnamemodify(tempname(), ':h') . '\asyncrun.cmd'
let l:run = ['@echo off', a:cmd]
call writefile(l:run, l:tmp)
let l:args += [l:tmp]

for example:

:! 1+1

works with Powershell configured, but

:AsyncRun 1+1

does not work, because it is not a valid .cmd syntax.
I have made a simple change in my asyncrun.vim that enables me to work with any powershell expression:

let l:run = [&shell . " " . a:cmd]

Please let me know if you have any other suggestion to makes this work, or need help to implement this.

Multiple processes

Is it possible/planned to be able to run multiple commands/processes simultaneously?

[suggestion] more friendly readme about copen

new to this plugin, nowhere to find why i have no quickfix popup after running the command, after a long search, finally found that i should call copen manually to see the result (usually i prefer quickfix window to be closed)

suggestion:

  • add an option to open quickfix automatically after command finish, and, make it default to true

  • add description about copen manually, in plugin's readme

  • or, have this setting as default:

    let g:asyncrun_exit='echo "AsyncRun " . g:asyncrun_status . "(" . g:asyncrun_code'
        \ . ' . "), use `:copen` to see the result"'
    

errorformat is ignored

I read #16 and #19 about the output is not matched by errorformat, which is defined with a CompilerSet command. I open a new issue because I didn't find a solution and those issues are old.

In ftplugin/javascript.vim: autocmd BufWritePost <buffer> compiler javascript | Make %
In compiler/javascript.vim:

let &l:makeprg=substitute(system('npm bin'), '^\n*\s*\(.\{-}\)\n*\s*$', '\1', '') . '/eslint' . " -f compact"
CompilerSet errorformat=%E%f:\ line\ %l\\,\ col\ %c\\,\ %m,%C%.%#

In pack/my/start/z/plugin/asyncrun.vim:

command! -bang -nargs=* -complete=file Make AsyncRun -program=make @ <args>

And the result is the following one:

|| [C:\my\Dev\snippets\argo\node_modules\.bin/eslint -f compact accounts.service.js]
accounts.service.js|38 col 67 error| Error - Missing semicolon. (semi)
|| 
|| [Finished in 1 seconds with code 1]

Instead of (using standard make)

accounts.service.js|38 col 67 error| Error - Missing semicolon. (semi)

I tried

:compiler javascript
:set errorformat=%E%f:\ line\ %l\\,\ col\ %c\\,\ %m,%C%.%#
:Make %

With the same undesired results.

Any hint or is it the expected result?

Reference: https://github.com/albertosantini/vimfiles

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.