New answers tagged


There are different approaches to this problem. Assuming your Vim has('job') you can do: let temp = bufadd('noname') call setbufvar(temp, '&buftype', 'nofile') call bufload(temp) let job = job_start('luacheck', #{in_io: 'buffer', in_buf: bufnr(), \ out_io: 'buffer', out_buf: temp, \ exit_cb: {id, status -> execute(printf('cb %d | bw %d | cw 5'...


You can create temporary file name with :h tempname(): let tempname = tempname() call writefile([ "hello world" ], tempname) " do something with tempname file " ... call delete(tempname)

Top 50 recent answers are included