-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running tasks sequentially #21
Comments
It is not a simply task, which would significantly increase the complexity. Many corner cases need to be handled. No problem for issues, they let me know how to polish this plugin. |
Understand. Will you try to implement it in future? It would be great to be able to pass multiple tasks to |
It is difficult to chain tasks with different |
Maybe you don't need to chain output of such tasks? |
Some kinds of tasks (including user defined runners) have no exit callback to notify AsyncTask to proceed next one. Some tasks will open a new split/tab, if people are editing in insert mode, opening a new split/tab is really unexpected. |
But if the user created a task that does this, this is the user's problem, I think.
Bad to hear :( |
Sad to say it is impossible. And a work around is to concatenate two commands with |
s/ |
Maybe it would be possible to get parameters from other tasks? [project-build]
command=cd ../build-$(VIM_PRONAME)-$(VIM_PROFILE) && cmake --build .
cwd=<root>
[project-run]
command=$(project-build:command) && ./my-executable
cwd=<root> |
A big refactor is required for this. |
Do you like the idea in general? If yes, I think that is possible to think about simpler syntax. |
It is a good idea. |
Okay :) [project-build]
command=cd ../build-$(VIM_PRONAME)-$(VIM_PROFILE) && cmake --build .
cwd=<root>
[project-run]
depends=project-build
command=cd ../build-$(VIM_PRONAME)-$(VIM_PROFILE) && ./my-executable
cwd=<root> It less flexible, but maybe it would be simpler to implement? |
That's even more complex, because |
Hm... What if use |
I use the following workaround to build and run a file: let s:asynctask_build_filetypes = ['c', 'cpp', 'rust']
function! s:asynctask_call_after_build_file()
augroup asyntask_file_build_finished
autocmd!
augroup END
AsyncTask file-run
endfunction
function! s:asynctask_build_and_run_file()
if index(s:asynctask_build_filetypes, &filetype) >= 0
augroup asyntask_file_build_finished
autocmd!
autocmd User AsyncRunStop call s:asynctask_call_after_build_file()
augroup END
AsyncTask file-build
else
call s:asynctask_call_after_build_file()
endif
endfunction
command! AsyncTaskBuildAndRunFile call <SID>asynctask_build_and_run_file()
nnoremap <S-F7> :AsyncTaskBuildAndRunFile<CR> Pressing |
Is it possible to run tasks sequentially? For example, in most IDEs, when a project starts, compilation occurs first. It would be convenient to assign build + run to a single key.
P.S. Sorry for a lot of issues :)
The text was updated successfully, but these errors were encountered: