Pass filename to vim build and run aliases

This commit is contained in:
Michael Campagnaro 2020-05-04 13:35:53 -04:00
parent 986bde34cb
commit d23a18db78

6
vimrc
View File

@ -870,12 +870,12 @@ function! StopRunTask()
endfunction endfunction
function! ExecuteRunScript() function! ExecuteRunScript()
exec "AsyncRun! -post=call\\ StopRunTask() ./run" exec "AsyncRun! -post=call\\ StopRunTask() ./run %"
endfunction endfunction
function! SilentBuild() function! SilentBuild()
AsyncStop AsyncStop
exec "AsyncRun! -save=2 -post=call\\ HideAsyncResults() ./build*" exec "AsyncRun! -save=2 -post=call\\ HideAsyncResults() ./build* %"
endfunction endfunction
" Show results window the moment the async job starts " Show results window the moment the async job starts
@ -891,7 +891,7 @@ nnoremap <leader>bc :call ToggleBuildResults()<cr>
noremap <F10> :call HideBuildResultsAndClearErrors()<cr> noremap <F10> :call HideBuildResultsAndClearErrors()<cr>
" Execute build script " Execute build script
nnoremap <leader>b :AsyncRun! -save=2 ./build*<cr> nnoremap <leader>b :AsyncRun! -save=2 ./build* %<cr>
nnoremap <F8> :call SilentBuild()<cr> nnoremap <F8> :call SilentBuild()<cr>
" Execute run script " Execute run script