Mercurial > vim
annotate src/testdir/color_ramp.vim @ 17761:109a0889b900 v8.1.1877
patch 8.1.1877: graduated features scattered
commit https://github.com/vim/vim/commit/ffc0716af8e448ef8a2a3249edfd0260546933df
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 17 20:17:51 2019 +0200
patch 8.1.1877: graduated features scattered
Problem: Graduated features scattered.
Solution: Put graduated and obsolete features together.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 17 Aug 2019 20:30:03 +0200 |
parents | 2d54f1e7ba0f |
children | 89364104be93 |
rev | line source |
---|---|
12944
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Script to generate a file that shows al 256 xterm colors |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 new |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 call setline(1, 'ANSI') |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 " ANSI colors |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 let s = '' |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 for nr in range(0, 7) |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 let s .= "\033[4" . nr . "m " |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 endfor |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 for nr in range(8, 15) |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 let s .= "\033[10" . (nr - 8) . "m " |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 endfor |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 " Add | in original color pair to see white background. |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 let s .= "\033[m|" |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 call setline(2, s) |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 " 6 x 6 x 6 color cube |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 call setline(3, 'color cube') |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 for high in range(0, 5) |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 let s = '' |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 for low in range(0, 35) |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 let nr = low + high * 36 |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 let s .= "\033[48;5;" . (nr + 16) . "m " |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 endfor |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 let s .= "\033[m|" |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 call setline(high + 4, s) |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 endfor |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 " 24 shades of grey |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 call setline(10, 'grey ramp') |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 let s = '' |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 for nr in range(0, 23) |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 let s .= "\033[48;5;" . (nr + 232) . "m " |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 endfor |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 let s .= "\033[m|" |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 call setline(11, s) |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 set binary |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 write! <sfile>:h/color_ramp.txt |
2d54f1e7ba0f
patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 quit |