Questions tagged [job-control]

The tag has no usage guidance.

7 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
130 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, { \ '...
Andy Stewart's user avatar
  • 1,319
3 votes
0 answers
119 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 ...
user1685095's user avatar
  • 1,141
1 vote
0 answers
352 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:...
dedowsdi's user avatar
  • 6,188
1 vote
0 answers
122 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 ...
doraemon's user avatar
  • 1,667
0 votes
0 answers
26 views

What's the usage of jobresize?

As title. I'm learning Neovim's terminal-emulator related API. To explain the problem I need to show you the code first. I have a Lua script like this: local win = vim.api.nvim_get_current_win() local ...
NeoZoom.lua's user avatar
  • 1,302
0 votes
0 answers
220 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 ...
ljyip's user avatar
  • 1
0 votes
0 answers
276 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 ...
gfe's user avatar
  • 245