-
Notifications
You must be signed in to change notification settings - Fork 113
FAQ
Linwei edited this page Oct 28, 2016
·
31 revisions
Can asyncrun.vim
trigger an autocommand QuickFixCmdPost
to get some plugin (like errormaker) processing the content in quickfix ?
Sure you can use either g:asyncrun_exit
or -post
in your case without modifing any code in asyncrun.vim.
setup global callback on job finished:
let g:asyncrun_exit = "silent doautocmd QuickFixCmdPost make"
setup local callback on each command:
:AsyncRun -post=silent\ doautocmd\ QuickFixCmdPost\ make @ make
The '%' is expanded and escaped by vim itself on the command line, and if the buffer named 'hello world', %
will be escaped as 'hello\ world' by vim. The backslash is okay on all the unix systems, but on windows, cmd.exe
assumes it as a path seperator.
Here is another accurate form on both windows and unix:
AsyncRun gcc "$(VIM_FILEPATH)" -o "$(VIM_FILEDIR)/$(VIM_FILENAME)"