Sunset : Automatically set background on local sunrise/sunset time.
| script karma
Downloaded by 515
Comments, bugs, improvements
script versions (upload new version)
Sunset automatically sets 'background' when the sun rises and sets, and also when you start Vim. When the sun is up, or rises, it'll 'set background=light'. When the sun is down, or sets, it'll 'set background=dark'.
Sunset can also change your 'colorscheme', your Powerline (https://github.com/Lokaltog/vim-powerline) theme, or anything else you can think of. See 'sunset_daytime_callback()' and 'sunset_nighttime_callback()' in the documentation for details.
So as not to interrupt you, Sunset waits for four seconds (on the CursorHold event) after you've pressed a key or left insert mode before changing the background. If you change your background during the day or night, it'll respect that.
If you feel that Sunset can be improved, pull requests and issues are appreciated and humbly requested, on Github at: http://github.com/amdt/sunset
Vim compiled with +float support. Use ':version' to check if this feature is available in your build.
Requires a system with 'strftime()', with the following format options:
- %j returns the current day of the year.
- %H returns the current hour of the day in 24-hour time.
- %M returns the current minute of the hour.
A colorscheme with both light and dark variants, such as Solarized (http://github.com/altercation/vim-colors-solarized) or Hemisu (http://github.com/noahfrederick/Hemisu).
|Installation is provided here with a Vimball. See ':help vimball' for installation instructions. If you prefer a package manager or manual install, please see the previously mentioned Github page.|
Click on the package to download.
ip used for rating: 22.214.171.124