aboutsummaryrefslogtreecommitdiff
path: root/runtime/scripts/emoji_list.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-10-12 11:23:31 +0200
committerChristian Clason <ch.clason+github@icloud.com>2024-10-15 20:50:21 +0200
commit82b02ae2f2af439a8c678ed6b55a43121055f279 (patch)
treefd6b93e01aedeeed026edb2c0a29b989dd163aad /runtime/scripts/emoji_list.lua
parentea5b748f243883b9890e465d4abef598fe2b07fc (diff)
downloadrneovim-82b02ae2f2af439a8c678ed6b55a43121055f279.tar.gz
rneovim-82b02ae2f2af439a8c678ed6b55a43121055f279.tar.bz2
rneovim-82b02ae2f2af439a8c678ed6b55a43121055f279.zip
fix(runtime): clean up one-off scripts
Problem: Some runtime files no longer spark joy. Solution: Kondo the place up. Still sparks _some_ joy (moved to new `runtime/scripts` folder): * `macros/less.*` * `mswin.vim` * `tools/emoji_list.lua` No longer sparks joy (removed): * `macmap.vim` (gvimrc file; not useful in Nvim) * `tools/check_colors.vim` (no longer useful with new default colorscheme and treesitter) * `macros/editexisting.vim` (throws error on current Nvim) * `macros/justify.vim` (obsolete shim for `packadd! justify`) * `macros/matchit.vim` (same) * `macros/shellmenu.vim` (same) * `macros/swapmous.vim` (same)
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