Tip #576: one call to generate all unicode "characters" from within vim
tip karma |
Rating 19/7, Viewed by 1229
|
created: |
|
October 5, 2003 17:16 |
|
complexity: |
|
basic |
author: |
|
[email protected] |
|
as of Vim: |
|
6.0 |
This is a small function to generate all unicode "characters".
It might be interesting to those who are familiar with CJK.
I modified Frank's idea, http://groups.yahoo.com/group/vim/message/43907,
with a neat format. (Thank you, Frank)
Tony Mechelynck offered a great tip as how to work with utf-8 in
http://vim.sourceforge.net/tip_view.php?tip_id=246
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
<<chop long lines. |
Access [email protected] using Newsgroup Reader >>
Additional Notes
|