Closed hashtegner closed 4 years ago
Thanks for reporting! I just added an additional section for nvim
configuration, let me know if the following works for you.
function! TwfExit(path)
function! TwfExitClosure(job_id, data, event) closure
bd!
try
let out = filereadable(a:path) ? readfile(a:path) : []
finally
silent! call delete(a:path)
endtry
if !empty(out)
execute 'edit! ' . out[0]
endif
endfunction
return funcref('TwfExitClosure')
endfunction
function! Twf()
let temp = tempname()
call termopen('twf ' . @% . ' > ' . temp, { 'on_exit': TwfExit(temp) })
startinsert
endfunction
nnoremap <silent> <Space>t :call Twf()<CR>
Wow, it works. Thanks!
Hello, I ran with NeoVim it raises a panic.
This issue didn't occur when I ran the inside vim 8. Any tips to fix or contribute?