Vim Tips Wiki
Register
(Change to TipImported template + severe manual clean)
({{merged|51}})
Line 1: Line 1:
  +
{{merged|51}}
  +
 
{{review}}
 
{{review}}
 
{{TipImported
 
{{TipImported

Revision as of 08:16, 17 April 2008

Obsolete tip

This tip has been merged into another tip.
See VimTip51 for the current tip.

Please do not edit this tip, and do not edit the discussion page.
If anything needs to be improved, please fix VimTip51.



Tip 576 Printable Monobook Previous Next

created October 5, 2003 · complexity basic · author maxiangjiang · version 6.0


This is a small function to generate all Unicode "characters". It might be interesting to those who are familiar with CJK.

function! GenerateUnicode()
  let i = 0
  while i <= 16*16*16*16
    let n = i
    let j = 0
    let h = ""
    while n
      let h = '0123456789ABCDEF'[n%16].h
      let n = n/16
    endwhile
    let c = h.' '
    while j<16
      let u = i+j
      let c = c.nr2char(u).' '
      let j = j+1
    endwhile
    $put = c
    let i = i+16
    if (i%(16*16) == 0)
      $put='----------------------------------------------------'
      $put=' 0 1 2 3 4 5 6 7 8 9 A B C D E F '
      $put='----------------------------------------------------'
    endif
  endwhile
endfunction

A screen shot is at http://www.clarkson.edu/~maxi/unicode.gif

Comments