Closed Renzix closed 4 years ago
I didn't check how execute and AsyncRun work together. However, based on your description, you can work around it with <expr>
mapping (if you're calling your command from mapping). For example:
nnoremap <expr> <leader>a ":AsyncRun " . g:my_cool_var . "\<cr>"
Remove last part if you want to edit command before running it.
Awesome works great thanks sorry for the lack of vimfu
The normal workaround for using a vimscript variable in a shell command is using
:execute "!" . command
however this does not work properly with AsyncRun because execute waits for the command to finish before sending it to standard output. I may just be stupid but is there a way to do use a vimscript variable in the shell command?