Alexander C. Gaber wrote:
A.J.Mechelynck wrote:
The following assumes that you have a version of gvim.exe with the
Unicode capabilities compiled-in, i.e., ":echo has('multi_byte') "
returns 1. (If it returns zero you need a different executable.)
I am using the version available on the Vim web site, which has
multi-byte compiled in. I also tested with the command you mentioned and
it returns the value 1.
I have tried a third-party font called "Code 2000" in the past: it has
glyphs for the whole BMP (U+0000 to U+FFFF) IIUC, or at least for
those codepoints where characters are defined; but they are ugly; and
I don't think it is Vim-compatible anyway. If you still want to try it
out, I guess Google is your friend.
Unfortunately you are right, it's not Vim-compatible :( It does not
appear in the list of fonts I can choose from. As a matter of fact, I
downloaded Vim 6.4 and for some reason I see more choices in Vim 6.4
than I see in Vim 7.0 on the same computer. Any idea why?
The problem with your proposed mappings is that I absolutely need to see
all languages at once. The most important part of my job for which I
wanted to use VIM was the ability to see differences between two files,
including differences between characters. For example, I have two files
like this:
English text;
French translation,
Greek translation,
Russian translation,
Chinese translation,
Japanese translation,
Arabic translation;
If the Arabic translation has even one character different, I would like
to spot it right away and the same goes for all languages; here, Vim's
diff functionality would greatly help, but if I can't see the graphical
difference, I may disregard it as a glitch in Vim's colouring. The other
problem is I sometimes need to verify the characters with the ones
displayed in another program (i.e. in a web page displayed by my browser
or an application) where I can change between translations in a second.
Mapping different characters, while probably a good solution, would
simply slow down my work.
But thank you for your answer and instructions on how to accomplish all
that, it's much appreciated.
Well, vimdiff will always fold away identical parts and display different
parts, regardless of whether your current font actually has glyphs for the
different characters. As long as the different characters are in the Unicode
BMP, toggling the font with the mappings in my previous post should be fast
enough. It might alter the global size of the Vim window because the character
cell size differs; here's an improved version to always keep Vim maximized:
:map <F6> :set gfn=Courier_New:h9:cDEFAULT lines=999 columns=9999<CR>
:imap <F6> <C-O>:set gfn=Courier_New:h9:cDEFAULT lines=999 columns=9999<CR>
:map <S-F6> :set gfn=MingLiU:h16:cDEFAULT lines=999 columns=9999<CR>
:imap <S-F6> <C-O>:set gfn=MingLiU:h16:cDEFAULT lines=999 columns=9999<CR>
Similarly, gvim will display the whole (split) windows either left-to-right or
right-to-left; it doesn't offer true bidi functionality. You may want to map
:map <F8> :setlocal invarabic<CR>
:imap <F8> <C-O>:setlocal invarabic<CR>
to toggle between Arabic (right-to-left) and Latin (left-to-right) view.
Another possibility is to display the same file in two split-windows, one LTR
and the other RTL.
Best regards,
Tony.