I am making a function to compile and run my application. I have been able to get it to run the shell command however I cannot get it to save the file.
Here is my code so far.
Try 1)
function Compile_and_run(game, major, minor)
:w <CR>
execute '!_compile' shellescape(a:game) shellescape(a:major) shellescape(a:minor)
endfunction
Try 2)
function Compile_and_run(game, major, minor)
execute ":w <CR>"
execute '!_compile' shellescape(a:game) shellescape(a:major) shellescape(a:minor)
endfunction
What is it that Im doing wrong? How would I get this function to save before the execute '!_compile'
command?