sponsor Vim development Vim logo Vim Book Ad

easel : your one-stop-shop for making color scheme development a breeze.

 script karma  Rating 0/0, Downloaded by 912  Comments, bugs, improvements  Vim wiki

created by
Niels Madan
 
script type
utility
 
description
easel includes:

* A set of source files in different languages to try out your color scheme.
* Functions and associated keybindings that come in useful when working on your colorscheme
* A dark canvas scheme to base your own color scheme on.

***quick how-to***

Start a new color scheme:

* Copy the dark_canvas directory out and rename it with whatever name you want to use for your color scheme
* Also rename the file that is in the colors directory and change the name in the line: let colors_name = "dark_canvas"

Work on the your color scheme:

* Open one of the files in the test_subjects directory
* Open your color scheme
* source easel.vim (so easel.vim) from the plugin directory.

***functions and mappings***

Highlight and HighlightND (use inside color scheme file)

The canvas includes two vimscript functions that allow the definition of color scheme rules with less typing. They assume that colors are defined as pairs of RGB hex colors and matching entries in the 256 terminal color scheme palette (xtem). For example:

let s:lime = ['#aeee00', 154]

The Highlight function (with defaults) can be called:

s:Highlight('Exception', s:lime, '', 'bold', '')

Which is equivalent to the command:

highlight guifg=#aeee00 guibg=bg gui='bold' guisp=fg ctermfg=154 ctermbg=bg cterm='bold'

The HighlightND function can be called in the same way, but does not add any default values.

***SynStack***

This function will show you the syntax groups for the word under the cursor and also copy it to the s register (clobbering whatever was there before, so beware) for easy pasting. It is a slightly modified version of a function posed to stackoverflow.com. The mapping is <leader><F3>.

***hexHighlight***

This function will replace any hex color codes with the actual colors. It was written by Yuri Feldmann and you can get it directly as a plugin on vim.org or on github. The mapping to toggle it on or off is <leader><F4>.

If you want to redefine the mappings, you can do so at the top of the easel.vim file for now (might make it configurable in the future at some point).

***test subjects***

The goal is to have high quality and real code that shows all the different syntax constructs.

javascript: underscore.js from underscore by Jeremy Ashkenas
python: auth.py from requests by Kenneth Reitz
ruby: base.rb from sinatra by Blake Mizerany
c: cluster.c from redis by Salvatore Sanfilippo

The respective license text has been added to the top of each source file if they weren't included already.

***contribute***

Head over to github: https://github.com/nielsmadan/easel

Pull requests welcome. If you have some idea about what other functions/mappings might be useful when workin on a color scheme or if you have some test subject file in other languages.
 
install details
 

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
easel.zip v1.0 2012-11-27 7.0 Niels Madan Initial upload
ip used for rating: 18.118.184.237

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.
   
Vim at Github