[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim
Subject:    Chinese input with vim: please help
From:       Neil Zanella <nzanella () cs ! mun ! ca>
Date:       2004-01-31 2:08:23
Message-ID: Pine.LNX.4.44.0401302247320.16548-100000 () garfield ! cs ! mun ! ca
[Download RAW message or body]


Hello,

I thought I had posted this before but either got no replies or the
message did not get through so I guess I'll post again...

-----------------------------------------------------------------------

I would like to use vim to insert Chinese characters. I would prefer to
use pinyin to input the characters if possible.
                                                                               
I am running Fedora Core 1 Linux <http://fedora.redhat.com/download/>
which comes with vim 6.2 <http://www.vim.org/>. On this system vim was
precompiled with options "+multi_byte +iconv +xim" among others as can be
seen by issuing the command: vim --version|grep "xim\|multi_byte\|iconv".
Hence I should be able to read and compose Chinese characters with vim.
                                                                               
The system has two Chinese XIM (X Input Method) servers installed. These
are xcin 2.5.3.pre3 <http://xcin.linux.org.tw/> and miniChinput 0.0.3 as
found at <http://minichinput.sourceforge.net/>. On the system the xcin
server is called xcin but the miniChinput server is called chinput.
However, the chinput executable from the miniChinput package is apparently
just a stripped down version of the real Chinput server which can be found
at <http://www.opencjk.org/~yumj/project-chinput-e.html>. The Chinput
package is not distributed with Fedora Core 1 and neither is Fxitx
<http://www.fcitx.org/cgi-bin/wiki/moin.cgi/English> which is yet another
XIM server for Linux. There are probably even more than the four chinese
input servers I just described out there but the one I mentioned seem to
be the most popular.
                                                                               
Apparently with emacs it is possible to input chinese characters without
even needing to start an X Input Method server at all, but I have not
tried this, plus I am not familiar with emacs, and would like to be
able to use vim to input Chinese characters instead.
                                                                               
When I log into Fedora Core 1 I have the following settings:
                                                                               
LANG: en_US.UTF-8
XMODIFIERS: @im=none
LC_MESSAGES:
LC_CTYPE:
LC_ALL:

and no XIM server running at all (as shown in the XMODIFIER environment
variable I suppose or alternatively seen by issuing the ps -aux command).
                                                                               
However, the GDM login screen has a language option that allows you to
choose one of the following among others prior to logging in provided you
set up these languages when Fedora Linux was installed:
                                                                               
Chinese (simplified), in which case I get the following settings:
                                                                               
LANG: zh_CN.UTF-8
XMODIFIERS: @im=Chinput
LC_MESSAGES:
LC_CTYPE:
LC_ALL:
                                                                               
                                                                               
or Chinese (traditional), in which case I get these settings:
                                                                               
LANG: zh_TW.UTF-8
XMODIFIERS: @im=xcin
LC_MESSAGES:
LC_CTYPE:
LC_ALL:
                                                                               
where zh stands for Zhong1wen2 (Chinese) with variants CN (China) and TW 
(Taiwan).

-----------------------------------------------------------------------------

So, basically, my questions are, how does vim go about supporting Chinese
input? Does it rely on an XIM server or can it do without just like emacs?
What are the advantages or disadvantages of relying on an XIM server?
Which XIM servers does vim support? How do I go about using one of the XIM
input servers (preferably miniChinput) with vim? How can I input Hanyu
Pinyin and have the Mandarin sounds translated to pictograms and displayed
by vim on the terminal window?
                                                                               
I can see that there is a file called
/usr/share/vim/vim62/keymap/pinyin.vim
installed on my system but I am not
quite sure how to use it.
                                                                               
Sorry for asking all these questions,
I am somewhat new to all these programs.
                                                                               
Thanks!
                                                                               
Neil


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic