Hello,
You can use the has() function like this:
if has('win32')
" options only for MS Windows
else
" options for other environments
endif
You can get into much finer detail than that. See the :help has() for more info.
cheers,
Peter
--- On Tue, 6/10/09, Steven Woody <[email protected]> wrote:
> From: Steven Woody <[email protected]>
> Subject: Determined OS type
> To: "Vim" <[email protected]>
> Received: Tuesday, 6 October, 2009, 4:02 PM
>
> Hi,
>
> In my .vimrc, can I write code to determined current OS
> type (native
> Unix, Win32, cygwin, etc.)? If so, I can make my
> .vimrc portable to
> different environments. Currently I
> happened to have such a
> requirement, because on my same laptop, I sometimes run
> Windows
> version of gvim and sometimes run cygwin's gvim in its X
> window.
>
> Hope someone can help.
>
>
> --
> Life is the only flaw in an otherwise perfect nonexistence
> -- Schopenhauer
>
> narke
> public key at http://subkeys.pgp.net:11371 ([email protected])
>
> >
>
__________________________________________________________________________________
Get more done like never before with Yahoo!7 Mail.
Learn more: http://au.overview.mail.yahoo.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---