On 13:35 Fri 31 Jan     , Егор wrote:
> In .vimrc I want to check if colorscheme COL1 exists, use it, else use COL2?
That's quite simple:

try
    colo COL1
catch /E185:/
    colo COL2
endtry

Another approach is to check if the colorscheme file is in place:

if !empty(globpath(&rtp, 'colors/COL1.vim'))
    colo COL1
else
    colo COL2
endif


Cheers,
Marcin

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to