I am trying to set up code auto-formatting with astyle. I have read many posts such as this one (see Derek's answer) about how to auto-format, but I'm stuck on the "install astyle" part. I downloaded the .zip from here. Now I don't know what to do to get a command like this
autocmd BufNewFile,BufRead *.cpp set formatprg=astyle\ -T4pb
to work in my .vimrc
. All I'm getting is the error "'astyle' is not recognized as an internal or external command, operable program or batch file."
EDIT: I have tried adding Astyle.exe to the system path (maybe I did that wrong??) and it still does not work.