On 12/01/09 10:10, Nicolas Aggelidis wrote:
> hi, i use vim both at work and at home so i share configuration files
> between them. is there any way to enable some options based on the
> value of global variable?
>
> i.e.
>
> athome=1
>
>
> if (athome=1)
> set cursorline
> else
> set nocursorline
>
> or
>
> if (athome=1)
> let g:LookupFile_DefaultCmd = ':LUTags'
> else
> let g:LookupFile_DefaultCmd = ':LUWalk'
>
> the posted examples are pointless, but i hope you get the idea!
>
>
> thanks in advance for your time,
> -nikolas
Why not? You could even check some environment variable if you know one
which is set to a different value (or if you set one differently) on
both systems:
if $FOOBAR == ''
set cursorline
endif
You could also set some setting differently on Windows or unix:
if has('unix')
language messages C
else
language messages en
endif
and so on.
Best regards,
Tony.
--
BLACK KNIGHT: Come on you pansy!
[hah] [parry thrust]
[ARTHUR chops the BLACK KNIGHT's right arm off]
ARTHUR: Victory is mine! [kneeling]
We thank thee Lord, that in thy merc-
[Black Knight kicks Arthur in the head while he is praying]
The Quest for the Holy Grail (Monty
Python)
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---