neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

emoji_list.lua (406B)


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