When I try and trigger PHPUnit tests within MacVim, I can't see coloured outputs in my command line:
The GUI version of Vim (MacVim on Mac OS X, GVim everywhere else) comes with a "dumb" terminal emulator that doesn't understand color at all.
If you want to run command-line programs without the ugly escape codes you'll need to either configure those programs to not use color when not possible or call them with dedicated options.
In your case:
:!vendor/bin/phpunit --colors=never ...
Since we are at it:
The default value has been
auto for a while but if you use an old release:
$ git config --global color.ui auto
This is a bit extreme but
npm expects a boolean, here:
$ npm config set color=false
I was facing same problem with
gvim on Linux.
Put following in your
'!' External commands are executed in a terminal window. Without this flag the MS-Windows GUI will open a console window to execute the command. The Unix GUI will simulate a dumb terminal to list the command output. The terminal window will be positioned at the bottom, and grow upwards as needed.