DayTimeColorer : Change color scheme according to position of the sun.
script karma |
Rating 2/2,
Downloaded by 1082 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
red rampage |
|
script type |
color scheme |
|
description |
This plugin calculates dawn, dusk, sunrise and sunset times and sets one of the four user defined color schemes according to sun position.
Git repo: https://bitbucket.org/redrampage/daytime-colorer-vim
Your vim must be compiled with +float feature.
Plugin uses algorithm from "Almanac for Computers, 1990"
Which description has been found at:
http://williams.best.vwh.net/sunrise_sunset_algorithm.htm
Idea of plugin is taken from:
http://allaboutvim.blogspot.com/2011/01/blog-post.html
...and turned into overkill =)
Automatic refresh code is taken from: vimscript #2658 |
|
install details |
Put the daytimecolorer.vim into .vim/plugin/
And add following lines into your .vimrc:
" Define color schemes
let g:dtcDayScheme = "pyte"
let g:dtcNightScheme = "wombat256"
" Those are optional
let g:dtcDawnScheme = "zenburn"
let g:dtcDuskScheme = "zenburn"
" Set coordinates of your place
let g:dtcLatitude = 59.935
let g:dtcLongitude = 30.325
" Set your timezone
let g:dtcTimeOffset = 4
" Enable automatic color refresh (updates color scheme without restarting vim, but may use some extra resources)
let g:dtcAutoRefresh = 1
|
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.220.204.192
|