annotate src/testdir/color_ramp.vim @ 35176:bbbd250e3d7a default tip

runtime(i3config/swayconfig): allow indented commands (#14757) Commit: https://github.com/vim/vim/commit/679f5abb9930fafda29ae038f47de357e9a0f53e Author: Josef Lito? <54900518+JosefLitos@users.noreply.github.com> Date: Mon May 13 22:03:42 2024 +0200 runtime(i3config/swayconfig): allow indented commands (https://github.com/vim/vim/issues/14757) fixes: https://github.com/vim/vim/issues/14752 Co-authored-by: jamespeapen <jamespeapen@users.noreply.github.com> Signed-off-by: Josef Lito? <54900518+JosefLitos@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 13 May 2024 22:15:04 +0200
parents 89364104be93
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
20053
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
4 let lnum = 1
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
5
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
6 " | in original color pair to see white background.
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
7 let trail_bar = "\033[m|"
12944
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 " ANSI colors
20053
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
10 call setline(lnum, 'ANSI background')
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
11 let lnum += 1
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
12
12944
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 let s = ''
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 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
15 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
16 endfor
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 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
18 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
19 endfor
20053
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
20 let s .= trail_bar
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
21
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
22 call setline(lnum, s)
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
23 let lnum += 1
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
24
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
25 " ANSI text colors
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
26 call setline(lnum, 'ANSI text')
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
27 let lnum += 1
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
28
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
29 let s = ''
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
30 for nr in range(0, 7)
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
31 let s .= "\033[0;3" . nr . "mxxxx"
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
32 endfor
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
33 for nr in range(8, 15)
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
34 let s .= "\033[0;9" . (nr - 8) . "mxxxx"
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
35 endfor
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
36 let s .= trail_bar
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
37
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
38 call setline(lnum, s)
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
39 let lnum += 1
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
40
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
41 " ANSI with bold text
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
42 call setline(lnum, 'ANSI bold text')
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
43 let lnum += 1
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
44
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
45 let s = ''
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
46 for nr in range(0, 7)
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
47 let s .= "\033[1;3" . nr . "mxxxx"
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
48 endfor
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
49 for nr in range(8, 15)
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
50 let s .= "\033[1;9" . (nr - 8) . "mxxxx"
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
51 endfor
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
52 let s .= trail_bar
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
53
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
54 call setline(lnum, s)
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
55 let lnum += 1
12944
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 " 6 x 6 x 6 color cube
20053
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
58 call setline(lnum, 'color cube')
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
59 let lnum += 1
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
60
12944
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 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
62 let s = ''
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 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
64 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
65 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
66 endfor
20053
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
67 let s .= trail_bar
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
68 call setline(lnum + high, s)
12944
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 endfor
20053
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
70 let lnum += 6
12944
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 " 24 shades of grey
20053
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
73 call setline(lnum, 'grey ramp')
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
74 let lnum += 1
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
75
12944
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76 let s = ''
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
77 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
78 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
79 endfor
20053
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
80 let s .= trail_bar
89364104be93 patch 8.2.0582: color ramp test does not show text colors
Bram Moolenaar <Bram@vim.org>
parents: 12944
diff changeset
81 call setline(lnum, s)
12944
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 set binary
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 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
85 quit