emoji_list.lua 406 B

1234567891011121314151617181920
  1. -- Script to fill the window with emoji characters, one per line.
  2. -- Source this script: :source %
  3. if vim.bo.modified then
  4. vim.cmd.new()
  5. else
  6. vim.cmd.enew()
  7. end
  8. local lnum = 1
  9. for c = 0x100, 0x1ffff do
  10. local cs = vim.fn.nr2char(c)
  11. if vim.fn.charclass(cs) == 3 then
  12. vim.fn.setline(lnum, string.format('|%s| %d', cs, vim.fn.strwidth(cs)))
  13. lnum = lnum + 1
  14. end
  15. end
  16. vim.bo.modified = false