Bram Moolenaar | 4e4473c | 2020-08-28 22:24:57 +0200 | [diff] [blame^] | 1 | " Script to fill the window with emoji characters, one per line. |
2 | |||||
3 | if &modified | ||||
4 | new | ||||
5 | else | ||||
6 | enew | ||||
7 | endif | ||||
8 | |||||
9 | " Use a compiled Vim9 function for speed | ||||
10 | def DoIt() | ||||
11 | let lnum = 1 | ||||
12 | for c in range(0x100, 0x1ffff) | ||||
13 | let cs = nr2char(c) | ||||
14 | if charclass(cs) == 3 | ||||
15 | setline(lnum, '|' .. cs .. '| ' .. strwidth(cs)) | ||||
16 | lnum += 1 | ||||
17 | endif | ||||
18 | endfor | ||||
19 | enddef | ||||
20 | |||||
21 | call DoIt() | ||||
22 | set nomodified |