Check operating system in .vimrc

Reference
:help has()
:help system()
:help matchstr()