view runtime/tools/emoji_list.vim @ 31827:1009c33499e7 v9.0.1246

patch 9.0.1246: code is indented more than necessary Commit: https://github.com/vim/vim/commit/142ed77898facf8f423fee2717efee1749c55f9a Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Thu Jan 26 12:00:00 2023 +0000 patch 9.0.1246: code is indented more than necessary Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes #11887)
author Bram Moolenaar <Bram@vim.org>
date Thu, 26 Jan 2023 13:15:04 +0100
parents 99ef85ff1af4
children
line wrap: on
line source

" Script to fill the window with emoji characters, one per line.
" Source this script: :source %

if &modified
  new
else
  enew
endif

" Use a compiled Vim9 function for speed
def DoIt()
  var lnum = 1
  for c in range(0x100, 0x1ffff)
    var cs = nr2char(c)
    if charclass(cs) == 3
      setline(lnum, '|' .. cs .. '| ' .. strwidth(cs))
      lnum += 1
    endif
  endfor
enddef

call DoIt()
set nomodified