I use my .vimrc file on my laptop (OS X) and several servers (Solaris & Linux), and could hypothetically someday use it on a Windows box. I know how to detect unix gene
homebrew vim and MacVim returns true for has('mac'),
however so does has('unix'). so to have it work across all unix platforms, a possible solution is:
if has('unix')
if has('mac') " osx
set guifont=...
else " linux, bsd, etc
set guifont=...
endif
elseif has('win32') || has('win64')
set guifont=...
endif
on the other hand, as of el capitan, the system vim returns false for has('mac'), and uname snooping is probably the way to go. it's an ancient version, never used it.