From 22b7288e0e3b08daa7e469c96d6643326476e003 Mon Sep 17 00:00:00 2001 From: Stefan Liebl Date: Wed, 26 Oct 2016 14:58:52 +0200 Subject: [PATCH] + asyncrun --- .gitmodules | 3 +++ pack/asyncrun/opt/asyncrun | 1 + vimfiles.stefan/plugin/toptica.vim | 20 +++++++++++++------- vimfiles.stefan/vimrc | 1 + 4 files changed, 18 insertions(+), 7 deletions(-) create mode 160000 pack/asyncrun/opt/asyncrun diff --git a/.gitmodules b/.gitmodules index 929e143..ae7fbfd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -62,3 +62,6 @@ path = pack/YouCompleteMe/opt/YouCompleteMe url = https://github.com/Valloric/YouCompleteMe ignore = untracked +[submodule "pack/asyncrun/opt/asyncrun"] + path = pack/asyncrun/opt/asyncrun + url = https://github.com/skywind3000/asyncrun.vim.git diff --git a/pack/asyncrun/opt/asyncrun b/pack/asyncrun/opt/asyncrun new file mode 160000 index 0000000..ad94d5e --- /dev/null +++ b/pack/asyncrun/opt/asyncrun @@ -0,0 +1 @@ +Subproject commit ad94d5ef7537049b6c0a3045119ff35061d7bb89 diff --git a/vimfiles.stefan/plugin/toptica.vim b/vimfiles.stefan/plugin/toptica.vim index ace00a2..b77ba7e 100644 --- a/vimfiles.stefan/plugin/toptica.vim +++ b/vimfiles.stefan/plugin/toptica.vim @@ -58,15 +58,21 @@ function GetAllMakeCompletions(ArgLead, CmdLine, CursorPos) return join(s:makegoals + s:makeopts + glob(a:ArgLead.'*', 1, 1), "\n") endfunction +function MakeOnFinished() + echo "make exit code: " . g:asyncrun_code +endfunction + function s:Make(args) + wa echo a:args - execute 'cd '.s:ProjectBuildDir.' | make ' . s:GetMakeOptions(a:args) . ' | cd -' - execute 'cd '.s:ProjectSrcDir - try - clist - catch /E42/ " list is empty - echo 'no output' - endtry + copen + let g:asyncrun_exit = 'call MakeOnFinished()' + execute 'AsyncRun make --directory=../build ' . s:GetMakeOptions(a:args) +" try +" clist +" catch /E42/ " list is empty +" echo 'no output' +" endtry endfunction function CopyFirmware(command) diff --git a/vimfiles.stefan/vimrc b/vimfiles.stefan/vimrc index 4fc8c27..6d40f40 100644 --- a/vimfiles.stefan/vimrc +++ b/vimfiles.stefan/vimrc @@ -268,6 +268,7 @@ let g:Gitv_OpenHorizontal = 1 " ------------------ " packages / plugins " ------------------ +packadd asyncrun packadd dirdiff packadd DoxygenToolkit packadd fugitive