asyncrun.extra
asyncrun.extra copied to clipboard
Floaterm shows error in window 10
Running ":AsyncRun -mode=term -pos=floaterm ls -la" shows error " 'ls' is not recognized as an internal or external command'
Here below is my partial .vimrc setting:
let opts = 'AsyncRun -mode=term -pos=floaterm ls -la'
"let opts = 'AsyncRun -mode=term -pos=external'
function! MyRunner(opts)
echo "command to run is: " . a:opts.cmd
endfunction
let g:asyncrun_runner = get(g:, 'asyncrun_runner', {})
let g:asyncrun_runner.test = function('MyRunner')
let g:asynctasks_term_pos = 'test'
ls is a linux command, are you working in windows ??
try this:
:AsyncRun -mode=term -pos=floaterm dir
ls is a linux command, are you working in windows ??
Yes
This option '-pos=floaterm' make my gvim crash after several seconds.
:AsyncRun -mode=term -pos=floaterm dir
I've changed to 'floaterm_reuse' and it worked well!
noremap <f5> :AsyncRun -mode=term -pos=floaterm_reuse %:r<cr>
so with this plugin, I don't have to adjust this function?
function! MyRunner(opts)
echo "command to run is: " . a:opts.cmd
endfunction
let g:asyncrun_runner = get(g:, 'asyncrun_runner', {})
let g:asyncrun_runner.test = function('MyRunner')
let g:asynctasks_term_pos = 'test'
Thanks for your quick response. much appreciate!
For windows, external
is recommended:
:AsyncRun -mode=term -pos=external dir
Crash ? Remember keep your vim/gvim update to date. Legacy popup implementation may be unstable.
You don't need MyRunner
stuff in your vimrc, it is just a test.