emoji_list.vim 411 B

123456789101112131415161718192021222324
  1. " Script to fill the window with emoji characters, one per line.
  2. " Source this script: :source %
  3. if &modified
  4. new
  5. else
  6. enew
  7. endif
  8. " Use a compiled Vim9 function for speed
  9. def DoIt()
  10. var lnum = 1
  11. for c in range(0x100, 0x1ffff)
  12. var cs = nr2char(c)
  13. if charclass(cs) == 3
  14. setline(lnum, '|' .. cs .. '| ' .. strwidth(cs))
  15. lnum += 1
  16. endif
  17. endfor
  18. enddef
  19. call DoIt()
  20. set nomodified