First off, I'm writing this for my setup at work, which is entirely on Windows. I'd imagine it would be quite a bit easier if I was able to use a proper terminal.
I've written a function in my vimrc that lets me run a syntax checker for the obscure programming language we use here. I'd like to read the output from that syntax checker into a variable in the function, which I can then use to set some linenumber marks or output to a temp buffer (like Syntastic).
I browsed through the helpfile and found redir =>, but it doesn't seem to work like I'd expect it to.
" SYNTAX CHECK FOR PROGRESS " ========================= function! CheckSyntaxCustom() if (&ft=='progress') redir => progress_output :execute '0read !c:\progress\openedge11_3\bin\_progres.exe -1 -b -Mm 16384 -pf c:\progress\openedge11_3\startup.pf -p c:\code\custom\syntax.p -param %:p' redir end :echom progress_output endif endfunction
Seems like I can't manipulate progress_output. Ideally I'd like it to return a string that I can then use with :execute, but right now it just pastes the command prompt output to the line below the cursor. I'm fairly new to vimscript so I could be completely wrong on what redir should be used for. Any advice on how to accomplish what I'm looking to do?