Created
January 3, 2013 15:07
-
-
Save bruth/4444123 to your computer and use it in GitHub Desktop.
Conditional Vim colorscheme based on time of day
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Set color scheme according to current time of day. | |
let hr = str2nr(strftime('%H')) | |
if hr <= 6 || hr > 18 | |
let cs = 'Tomorrow-Night' | |
else | |
let cs = 'Tomorrow' | |
endif | |
execute 'colorscheme '.cs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment