In Console2, you can set arbitrary environment variables by modifying the shell invocation (from the Settings dialog, or directly in the XML config). For the default Windows command prompt, use a value of:
cmd.exe /K set EMULATOR=console2
For Cygwin Bash, something like this should work:
C:\cygwin\bin\bash.exe -c "export EMULATOR=console2; exec /bin/bash -i"
Then, check for the $EMULATOR
value in a conditional in your .vimrc
, as outlined by romainl's answer.