aboutsummaryrefslogtreecommitdiff
path: root/runtime/scripts/emoji_list.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/scripts/emoji_list.lua')
-rw-r--r--runtime/scripts/emoji_list.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/runtime/scripts/emoji_list.lua b/runtime/scripts/emoji_list.lua
new file mode 100644
index 0000000000..63bbbe4371
--- /dev/null
+++ b/runtime/scripts/emoji_list.lua
@@ -0,0 +1,19 @@
+-- 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