sponsor Vim development Vim logo Vim Book Ad

Changing color script : Syntax highlight colors change gradually based on minutes of hour

 script karma  Rating 24/35, Downloaded by 3198    Comments, bugs, improvements  Vim wiki

created by
Paul Contreras
script type
color scheme
Tested Java, Javascript, HTML, CSS, PHP, ActionScript (with 'actionscript.vim', available elsewhere in Vim.org), AutoIt and AutoHotKey.  Gradually changes changing syntax colours over the hour.

Borrowed idea from classic Atari 400, 800 changes colors at command prompt when detected not being used.

On Windows there is just a tiny flicker, it's not perfectly smooth, but it's small.  I thnk it's pretty decent now.  It's better than it was.  On MACVim it's very smooth.  

+ improves time awareness
+ visually stimulates
+ easy to install/uninstall

- on Windows GUI resources consumed, after 10 hours might have to shutdown vim
- on Windows tiny and much improved flicker while the colors change ~ 20 secs

The way it works is at the turn of the hour the colors look brightest, and at the half hour they look dark.  So it's like light-dark, but either way they still remain visible on the screen.  Plus there are three versions of the "Bright" mode, a light pink, light yellow, and light green.  When you move the cursor on Windows, the screen changes into the default color scheme for a while, and then goes back to changing.  On MAC it's the same except the MAC allows you to move the cursor as well.  Only when you edit the default color comes in.  And the MAC is very smooth when changing the colors too.  If you don't like the default "non-gradual" color scheme, you can change it.  Simply add a line to your vimrc like this: let g:changingColorStop = "XXXX" where XXXX is your choice of color scheme.  It can be any color scheme in vim, or any you download later.

Happy vim-ing!! :)

Please don't forget to vote.
install details
Open changingColor.vba in VIM, do a :so % on the command line.  Restart VIM completely.  Chaging color starts working ~ ten seconds.  To remove, do a :RmVimball changingColor.  Note, you do not need to put .vba at the end.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
changingColor.vba 17.4 2014-04-15 7.0 Paul Contreras Reduces flicker
changingColor.vba 17.3 2013-07-02 7.0 Paul Contreras Made sure this is the same version that includes the user-settable g:changingColorStop variable checks had it inconsistently done this before.  Now it's consistent
changingColor.vba 17.2 2013-06-21 7.0 Paul Contreras Modified to make user setable default color scheme
changingColor.vba 17.2 2013-05-10 7.0 Paul Contreras corrected a slight glitch that made the scren flicker every time you moved the cursor uneccessarily.  this sets a simple flag to stop it doing hence correcting the problem
changingColor.vba 17.2 2013-05-10 7.0 Paul Contreras Any movement in cursor, plus changes in current file in window, and entering Insert mode blips funkily back to a normal colour scheme, then after the few second delay the gradual changing colour scheme comes in, to remind you time is passing.  As you enter a new buffer, move the cursor, or insert again the color schemes blips back to normal .. if you don't like the color scheme easily change it by editing the bottom 3 lines of changingColor.vim, which is in ./.vim/ under plugin somewhere in mac, or <your user dir>/vimfiles/plugin in Windows 7
changingColor.vmb 17.2 2013-05-09 7.0 Paul Contreras This is a quick mod that adds a bit of fizz to the editing, a \"standard\" funky scheme is picked but as soon as you stop editing the \"changing one\" to remind you of time passing.  Good for keeping your boss off your case.  You can change my choice in color scheme if you like, just find your plugin directory in vim, hint, type :echo $VIM$ or :echo $VIMRUNTIME$, on mac it's in $HOME$/.vim/plugin, and change the bottom two lines of changingColor.vim.  You can change what \"event\" triggers this as well.
changingColor.vba 17.2 2011-05-17 7.0 Paul Contreras Made foreground NonText color same as that of Constant (prettier, not like that of ugly Normal, as I had b4)
changingColor.vba 17.1 2011-05-17 7.0 Paul Contreras You can now see the NonText character, before I had it so that you couldn't
changingColor.vba 17.0 2011-05-17 7.0 Paul Contreras Stopped Question and MoreMsg becoming invisible; visibility tweaks to NonText.
changingColor.vba 16.9 2011-04-26 7.0 Paul Contreras Brightened up Special an Identifier under low light
changingColor.vba 16.8 2011-04-25 7.0 Paul Contreras Unconfused mixup with fg and bg for Search and Visual, i got fg and bg wrong way.  Fixed and seems ok now.
changingColor.vba 16.7 2011-04-24 7.0 Paul Contreras Collated temporary variables into one single variable and used this.  Tweaked poor contrast of Search and Visual syntax elements.  Made code formatting more normal.
changingColor.vba 16.6 2011-01-19 7.0 Paul Contreras Made Changing Color Script install as a VimBall, to save you copying and pasting lines into your _vimrc.  See install instructions.
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo