On 2006-10-25, Martin Krischik <[EMAIL PROTECTED]> wrote:
> Am Mittwoch, 25. Oktober 2006 18:12 schrieb Tim Chase:
> > > for my font plug in I need to know which OS I am running on to
> > > choose an appropriate font. Now when Sun Solaris where added
> > > to the list of OS I use I run into a little problem: there is
> > > only "has('unix')" - but that's not good enough as Linux
> > > allows for anti alias fonts and Sun Solaris does not.
> >
> > Perhaps something like
> >
> > if has('unix')
> > let os = system('uname')
> > if os ~= 'Linux'
> > " do linuxy stuff here
> > elseif os ~= 'Solaris'
> > " do solarisy stuff here
> > endif
> > endif
> >
> > would do the trick?
>
> sure it would - but it also means calling an external program at startup.
> Well, if all else fails...
You'll never notice it. But if you're still concerned about it, you
could execute something like
env | sort > env.linux
on your Linux system and
env | sort > env.solaris
on your solaris system, then
vimdiff env.linux env.solaris
and look for some environment variable whose presence/absence or
value indicates which system you're on and test for that in your
.vimrc.
HTH,
Gary
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Wireless Division
| Spokane, Washington, USA