Skip to content

Instantly share code, notes, and snippets.

@bruth
Created January 3, 2013 15:07
Show Gist options
  • Save bruth/4444123 to your computer and use it in GitHub Desktop.
Save bruth/4444123 to your computer and use it in GitHub Desktop.
Conditional Vim colorscheme based on time of day
" 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