Questions tagged [job-control]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
22 views

Vim terminal job prevents from exiting

I'm writing a function which is supposed to create a terminal buffer once for the entire Vim session and which would not prevent it from exiting. Here is how it looks like: let s:term_buf_nr = -1 ...
2
votes
1answer
57 views

Job continuously outputting to Vim buffer

I have a job that produces output continually. I want to write this output to a Vim buffer. I start it with: let job = job_start(cmd, { 'out_io': 'buffer', 'out_name': 'joboutput' }) But I can't see ...
1
vote
0answers
100 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
36 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 ...
1
vote
1answer
55 views

jobsend sends no data even though return code is 1?

So I am trying to send some json text to a python script with jobsend in neovim like this: let l:json_msg = json_encode(a:msg) call jobsend(s:vimwatcher_job, l:json_msg) If i echo l:json_msg I can ...
3
votes
1answer
394 views

Vim immediately sent to background

Whenever I call Vim from the CLI, either to edit a file (vim idk.tex) or without arguments, or run a command (vim +help), it gets sent to the background, as if I had pressed Ctrl+Z. In order to use ...
2
votes
1answer
1k views

How do I get the output of a vim 8.0 job?

I wanted to try vim 8.0's new job start feature with a simple "hello world" style example. I tried: :let job = job_start('ls -alh') but there is no output. I tried echo job_info(job) and that ...
3
votes
0answers
102 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
204 views

How can I set the working directory for only the job_start() process?

I would like to set the working directory for the process started with job_start(). The only way I know how to do this is to change Vim's current working directory before calling job_start(), and ...
1
vote
2answers
489 views

Run :cwindow after :Neomake finishes

How do I attach a callback to :NeomakeProject so that :cwindow is executed after compilation finishes? i.e. I'm too lazy and want everything (open the error list) to happen automatically. (currently ...