On 06/10/09 07:42, Steven Woody wrote:
>
> On Tue, Oct 6, 2009 at 1:08 PM, Peter Hodge<[email protected]> wrote:
>>
>> 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.
>
> It helps! Thanks you.
>
>
Since there are many different has() tests for various versions of Dos
and Windows, in many cases it is simpler to use
if has('unix')
" do some stuff for Unix-like platforms
else
" do some other stuff for Windows (but not Cygwin)
endif
(e.g. IIUC has('win32') comes out FALSE on 64-bit versions of Vim for
Windows).
On Cygwin, has('unix') is TRUE just like on Linux or "true" Unix; if you
want to do something _only_ on Cygwin and not on other Unix-like
platforms, use has('win32unix').
See "help feature-list" for all possible arguments to has(); for finer
control over whether this or that feature is present there is also ":if
exists(...)" (q.v.). If you try has() or exists() with an unknown
argument value, you don't get an error: it just returns FALSE i.e. zero.
Best regards,
Tony.
--
You need only reflect that one of the best ways to get yourself a
reputation as a dangerous citizen these days is to go about repeating
the very phrases which our founding fathers used in the struggle for
independence.
-- Charles A. Beard
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---