Questions tagged [job-control]

The tag has no usage guidance.

7 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
87 views

Why would job_start()'s close_cb sometimes not be called?

I have a job_start() call like this: let options = { \ 'stdoutbuffer': [], \ 'handler': a:handler, \ } let command = s:build_command(a:cmd) let s:job = job_start(command, { \ '...
3
votes
0answers
117 views

How to emulate vim job out_io buffer with neovim?

I'd like to make a plugin with functionality that is similar to https://github.com/ramele/agrep and grep-edit in emacs. That is get search results from ag or some other tool that supports multiline ...
1
vote
1answer
45 views

Why does ch_evalraw() evaluate to my message instead of the response?

I am trying to learn about jobs and channels on Vim (on Windows), and I am using the following sequence as an example: let job = job_start("cmd") let channel = job_getchannel(job) let ...
1
vote
0answers
226 views

How to flush job output in vim8?

Trying to do something with job output in exit_cb or close_cb, but it's all buffered, how to flush it. e.g.: function! s:exit_cb(job, status) echom getbufline(s:bufnr, '$') endfunction function! s:...
1
vote
0answers
58 views

neovim: exit code for jobs terminated by jobstop

When I call jobstop on a running script waiting for input, the on_exit callback is invoked. But the exit code is always 0. Is this the correct behavior? According to :h jobstop it should be killed ...
0
votes
0answers
20 views

How to set up a buffer to receive command output

In my $VIMRC, I would like to autocmd BufWinEnter *.ly call s:BufWinEnterLY() autocmd TextChanged *.ly call s:TextChangedLY() autocmd BufUnload *.ly call s:BufUnloadLY() I want s:BufWinEnterLY() to ...
0
votes
0answers
123 views

Make vim commands be executed once a job on a terminal buffer has finished

The context I've the following mapping in ~/.vim/ftplugin/cpp/mappings.vim. What this mapping does is to compile an arbitrary C++ file and open two windows (a) and (b). (a) shows the output of the ...