skywind3000 / asyncrun.vim

:rocket: Run Async Shell Commands in Vim 8.0 / NeoVim and Output to the Quickfix Window !!
https://www.vim.org/scripts/script.php?script_id=5431
MIT License
1.84k stars 109 forks source link

Can I map a key to copen then AsyncRun xxx? #255

Closed sangshuduo closed 2 years ago

sangshuduo commented 2 years ago

sorry if the question is stupid

skywind3000 commented 2 years ago
:noremap <f12> :copen | AsyncRun xxx <cr>

??

sangshuduo commented 2 years ago

this way does not work as I expected. copen and asyncrun do not run seamlessly. But I found the following works as what I expected (BTW, I am using neovim):

add two lines in lua/custom/init.lua

vim.cmd "let g:asyncrun_open = 6" vim.cmd "noremap :AsyncRun make "

skywind3000 commented 2 years ago

great