neovim/runtime/tools/emoji_list.lua
Christian Clason 9788b81d7e fix(runtime): fully port emoji_list to Lua
Problem: `runtime/tools/emoji_list.vim` is a Lua script masquerading as
Vimscript, which is unnecessary now that `:source` works for Lua files.

Solution: Remove Vimscript wrapper.
2024-10-06 12:44:50 +02:00

20 lines
406 B
Lua

-- Script to fill the window with emoji characters, one per line.
-- Source this script: :source %
if vim.bo.modified then
vim.cmd.new()
else
vim.cmd.enew()
end
local lnum = 1
for c = 0x100, 0x1ffff do
local cs = vim.fn.nr2char(c)
if vim.fn.charclass(cs) == 3 then
vim.fn.setline(lnum, string.format('|%s| %d', cs, vim.fn.strwidth(cs)))
lnum = lnum + 1
end
end
vim.bo.modified = false