asyncrun.extra icon indicating copy to clipboard operation
asyncrun.extra copied to clipboard

Floaterm shows error in window 10

Open NDK2020 opened this issue 4 years ago • 3 comments

Running ":AsyncRun -mode=term -pos=floaterm ls -la" shows error " 'ls' is not recognized as an internal or external command'

image

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'

NDK2020 avatar Feb 16 '21 07:02 NDK2020

ls is a linux command, are you working in windows ??

try this:

:AsyncRun -mode=term -pos=floaterm  dir

skywind3000 avatar Feb 16 '21 09:02 skywind3000

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!

NDK2020 avatar Feb 16 '21 10:02 NDK2020

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.

skywind3000 avatar Feb 16 '21 14:02 skywind3000