UNPKG

2.4 kBMarkdownView Raw
1Colorschemes
2============
3
4
5## Define syntax highlighting
6
7Open `estilo/syntax/base.yml` (and then the other templates inside the folder) with vim and fill its definitions with these rules:
8
9- first value is the foreground (`guifg`)
10- second value is the background (`guibg`)
11- the third value is for text styles, and you should write just the key letter of every style (b: **b**old, r: **r**everse, u: **u**nderline, i: **i**talic, c: under**c**url)
12- fourth value is the undercurl color (`guisp`, only for gVim)
13- a hyphen (`-`) or an ommited value will be rendered as `NONE`
14- a dot (`.`) will not render this foreground/background/style
15
16![syntax-help](https://cloud.githubusercontent.com/assets/829859/18372714/f7bb7f44-763e-11e6-93e0-5d240244b108.png)
17
18Examples (template - result):
19
20Omitting values:
21
22```yaml
23Comment: 'sky'
24```
25
26```vim
27hi Comment guifg=#bbddff ctermfg=153 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
28```
29
30Omitting values with dashes:
31
32```yaml
33Title: '- cherry bu'
34```
35
36```vim
37hi Title guifg=NONE ctermfg=NONE guibg=ffbbcc ctermbg=218 gui=bold,underline cterm=bold,underline
38```
39
40Prevent to print style with dots
41
42```yaml
43Other: '. . ri'
44```
45
46```vim
47hi Other gui=reverse,italic cterm=reverse,italic
48```
49
50Link to other definition:
51
52```yaml
53WarningMsg: 'link Title'
54```
55
56```vim
57hi link WarningMsg Title
58```
59
60
61## Add more syntax highlighting templates
62
63Estilo bundles a pack of templates for common language syntaxes and plugins, you can add this templates by running `estilo add-syntax` on your terminal.
64
65
66See [list of available syntax templates](https://github.com/jacoborus/estilo/tree/master/templates/syntax)
67
68
69## Add colorschemes to `estilo.yml`
70
71Open `estilo.yml` file and add an object for each colorcheme with its parameters inside `colorschemes` list. Every one has 3 parameters:
72
73- name: the name of the colorscheme (should have not spaces)
74- background: 'dark' or 'light' ('dark' by default)
75- palette: the name of the color palette. It's the same as the file inside `palettes` folder without the `.yml` extension
76
77Example:
78
79```yml
80colorschemes:
81 - name: 'awesome-night'
82 background: 'dark'
83 palette: 'night'
84 - name: 'awesome-day'
85 background: 'light'
86 palette: 'day'
87```
88
89
90## Render
91
92With the command line in the project folder:
93
94```sh
95estilo render
96```
97
98Rendered files are in `colors` folder of your project
99
100
101---
102
103**Next: [Airline themes](airline.md)**