Mercurial > vim
annotate src/testdir/color_ramp.vim @ 12746:27eee6528b3d v8.0.1251
patch 8.0.1251: invalid expressin passed to WaitFor()
commit https://github.com/vim/vim/commit/d97fbf171ec0e63117813da045d2a1c51a9b6f62
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 2 19:23:03 2017 +0100
patch 8.0.1251: invalid expressin passed to WaitFor()
Problem: Invalid expressin passed to WaitFor().
Solution: Check if the variable exists.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 02 Nov 2017 19:30:06 +0100 |
parents | a0199c0efc73 |
children |
rev | line source |
---|---|
12604
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Script to generate a file that shows al 256 xterm colors |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 new |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 call setline(1, 'ANSI') |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 " ANSI colors |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 let s = '' |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 for nr in range(0, 7) |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 let s .= "\033[4" . nr . "m " |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 endfor |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 for nr in range(8, 15) |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 let s .= "\033[10" . (nr - 8) . "m " |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 endfor |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 let s .= "\033[107m|" |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 call setline(2, s) |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 " 6 x 6 x 6 color cube |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 call setline(3, 'color cube') |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 for high in range(0, 5) |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 let s = '' |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 for low in range(0, 35) |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 let nr = low + high * 36 |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 let s .= "\033[48;5;" . (nr + 16) . "m " |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 endfor |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 let s .= "\033[107m|" |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 call setline(high + 4, s) |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 endfor |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 " 24 shades of grey |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 call setline(10, 'grey ramp') |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 let s = '' |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 for nr in range(0, 23) |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 let s .= "\033[48;5;" . (nr + 232) . "m " |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 endfor |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 let s .= "\033[107m|" |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 call setline(11, s) |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 set binary |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 write! <sfile>:h/xterm_ramp.txt |
a0199c0efc73
patch 8.0.1180: MS-Windows testclean target deletes the color script
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 quit |