[ANN] EasyColour 1.0.0: Colour Schemes made Easy!

47 views
Skip to first unread message

A. S. Budden

unread,
Feb 23, 2012, 10:28:32 AM2/23/12
to Vim ML
The first public release of EasyColour is available from either of the
following URLs:

http://www.cgtk.co.uk/vim-scripts/easycolour

http://www.vim.org/scripts/script.php?script_id=3950

This plugin makes it really easy to create your own colour scheme for
Vim. You don't need to understand Vim script and you can base your
colour scheme on an existing one if you like.

For colour schemes written entirely with EasyColour, the plugin
automatically handles details like:

* Working with limited numbers of colours (the nearest available
colour is automatically found for 8, 16 and 256 colour terminals);
* Changing the background colour: define your colour scheme with (say)
a dark background with light foreground colours, set the 'LightAuto'
flag and EasyColour will automatically choose some dark foreground
colours to work with a light background.

Why write a colour scheme like this:

let colors_name = "mycolourscheme"
hi Normal guibg=DarkBlue guifg=White ctermbg=4
hi Statement ctermfg=3 ctermbg=6 gui=undercurl guifg=Yellow
guibg=#f6e8d0 guisp=Red
hi Keyword guifg=White guibg=DarkBlue ctermfg=0 ctermbg=4
hi Comment guifg=SeaGreen ctermfg=2 gui=Bold cterm=bold

when you can write it like this:

Dark:
Normal:White,DarkBlue
Statement:Yellow,#F6E8D0,Red,Undercurl
Keyword:White
Comment:SeaGreen,Style=Bold

with all of the styles automatically highlighted (when you save) so
you can see what the colours look like?

I've ported my 'Bandit' colour scheme from the previous (already
customised!) format into EasyColour now: it's included in the
distribution as an example of a fairly advanced colour scheme.

Comments on a postcard to the usual address (or you could just email me...).

Al

--
http://www.cgtk.co.uk

Ben Fritz

unread,
Feb 23, 2012, 1:45:24 PM2/23/12
to vim_use


On Feb 23, 9:28 am, "A. S. Budden" <abud...@gmail.com> wrote:
> The first public release of EasyColour is available from either of the
> following URLs:
>
>    http://www.cgtk.co.uk/vim-scripts/easycolour
>
>    http://www.vim.org/scripts/script.php?script_id=3950
>
> This plugin makes it really easy to create your own colour scheme for
> Vim.  You don't need to understand Vim script and you can base your
> colour scheme on an existing one if you like.
>

I have a few suggestions, although I doubt I'll use the plugin
(because I don't mind using the default method), but the idea of so
easily basing one scheme off another is intriguing (I suppose I could
probably do a :source or :runtime command...).

Something that bugs me about color schemes often is that important
things like DiffChange, ColorColumn, and more are just plain missing.
Maybe your plugin could warn if the user has nothing defined for one
of the common groups?

A related gripe is that similar items like Number and Constant are not
always defined, even if the author just wants to link them together.
Does the plugin handle linking groups? Or at least defining multiple
groups in one shot, like:

Number,Constant,String:Cyan

Finally, is the plugin able to export the colorscheme into the default
format (or at least something that will load without the plugin)? I
doubt many people would want to install a plugin just to get at a few
colorschemes.

Xell Liu

unread,
Feb 23, 2012, 3:16:49 PM2/23/12
to vim...@googlegroups.com

On Friday, February 24, 2012 at 2:45 AM, Ben Fritz wrote:

>
> A related gripe is that similar items like Number and Constant are not
> always defined, even if the author just wants to link them together.
> Does the plugin handle linking groups? Or at least defining multiple
> groups in one shot, like:
>
> Number,Constant,String:Cyan
>
> Finally, is the plugin able to export the colorscheme into the default
> format (or at least something that will load without the plugin)? I
> doubt many people would want to install a plugin just to get at a few
> colorschemes.
>

I second the suggestions about multiple groups and export function. Additionally, I'd like to ask for using variables. If I can define a variable like "color1=#ff0000" to use elsewhere, later modification will be more easier --- just like the name of your plugin implies.


A. S. Budden

unread,
Feb 23, 2012, 3:43:21 PM2/23/12
to vim...@googlegroups.com
Hi Ben,

On 23 February 2012 18:45, Ben Fritz <fritzo...@gmail.com> wrote:
>
>
> On Feb 23, 9:28 am, "A. S. Budden" <abud...@gmail.com> wrote:
>> The first public release of EasyColour is available from either of the
>> following URLs:
>>
>>    http://www.cgtk.co.uk/vim-scripts/easycolour
>>
>>    http://www.vim.org/scripts/script.php?script_id=3950
>>
>> This plugin makes it really easy to create your own colour scheme for
>> Vim.  You don't need to understand Vim script and you can base your
>> colour scheme on an existing one if you like.
>>
>
> I have a few suggestions, although I doubt I'll use the plugin
> (because I don't mind using the default method), but the idea of so
> easily basing one scheme off another is intriguing (I suppose I could
> probably do a :source or :runtime command...).

That's how the plugin does it.

> Something that bugs me about color schemes often is that important
> things like DiffChange, ColorColumn, and more are just plain missing.
> Maybe your plugin could warn if the user has nothing defined for one
> of the common groups?

Interesting point. Often the it's find to leave these as their
defaults, but I could add a function that lists (or adds templates
for) the ones that aren't defined yet.

> A related gripe is that similar items like Number and Constant are not
> always defined, even if the author just wants to link them together.
> Does the plugin handle linking groups? Or at least defining multiple
> groups in one shot, like:
>
> Number,Constant,String:Cyan

I like that, I might just do that! I've been meaning to add a link
syntax to do the equivalent of "hi link Number Constant", but haven't
got there yet (it's only the first release!)

> Finally, is the plugin able to export the colorscheme into the default
> format (or at least something that will load without the plugin)? I
> doubt many people would want to install a plugin just to get at a few
> colorschemes.

This is also on my wish list at the moment. It should be fairly easy
to implement, I just haven't had time yet.

Thanks for the ideas,

Al

--
http://www.cgtk.co.uk

A. S. Budden

unread,
Feb 23, 2012, 3:45:11 PM2/23/12
to vim...@googlegroups.com

The variables is an interesting idea. I'll probably implement links
first (so that you can effectively use one highlight group as a
variable), but adding an independent variable would certainly be
useful.

Thanks,

Al

--
http://www.cgtk.co.uk

A. S. Budden

unread,
Feb 23, 2012, 3:46:25 PM2/23/12
to vim...@googlegroups.com
On 23 February 2012 20:43, A. S. Budden <abu...@gmail.com> wrote:
[snip]

> Interesting point.  Often the it's find to leave these as their
> defaults, but I could add a function that lists (or adds templates
> for) the ones that aren't defined yet.
[snip]

Brain-keyboard-interface error: I meant to say:

"Often it's fine to leave these as their defaults".

Al

Michael Ludwig

unread,
Mar 3, 2012, 8:16:45 AM3/3/12
to vim_use
Ben Fritz schrieb am 23.02.2012 um 10:45 (-0800):
> On Feb 23, 9:28 am, "A. S. Budden" <abud...@gmail.com> wrote:
> >
> >    http://www.cgtk.co.uk/vim-scripts/easycolour

> > This plugin makes it really easy to create your own colour scheme
> > for Vim.

> Something that bugs me about color schemes often is that important


> things like DiffChange, ColorColumn, and more are just plain missing.

> […] A related gripe is that similar items like Number and Constant are


> not always defined, even if the author just wants to link them
> together.

Which colour schemes would you quote as a model par excellence for
someone trying to learn them?

Michael

Ben Fritz

unread,
Mar 3, 2012, 1:28:57 PM3/3/12
to vim_use
I actually think I have yet to find a colorscheme which defines all
the groups, and sometimes the missing groups have pretty garish
default colors when combined with the scheme.

You can get a list of colors to define (actually 2 lists) at:

:help highlight-groups
:help group-name
Reply all
Reply to author
Forward
0 new messages