On 21/11/11 18:37, jason.桂林 wrote:
I normally input code in vim, it's all ascii chars, but sometime I need
type chinese, for document and comment.
The input method is chinese at insert mode, and I press <esc>, and then
I type some vim command, but this command can't be execute unless I
switch input method back to english.
I will never use chinese input method at normal mode, and visual mode.
so can I disable input method at these mode?
If I can't, I think it's a big problem.
--
Best regards,
Jason Green
桂林
It should be possible, but you have to make sure that Vim and the
input-method interface agree on which signals they exchange how and
when; and first and foremost, you must know that there are two different
input-method subpackages in Vim, one for Window (called IME or Global
IME) and one for Unix-like systems with X11 (called XIM).
See:
- for Windows (compiled with +multi_byte_ime or +multi_byte_ime/dyn)
:help mbyte-IME
- for X11 (compiled with +xim)
:help mbyte-XIM
- for all versions (compiled with either of the above)
:help 'imactivatekey'
:help 'imcmdline'
:help 'imdisable'
:help 'iminsert'
:help 'imsearch'
On Windows, if ":version" says your gvim is compiled with
+multi_byte_ime/dyn, type
:echo has('multi_byte_ime')
to see if the dynamic library has been found (it should normally have).
(The possible answers are 1=yes, 0=no.) On X11, +xim in the :version
text is usually assurance enough.
I recommend that you read the full section relevant for your OS, and
then the full text of the help for these five options. If after that
(and some experimenting) you need more help, come back here, but don't
forget to tell us (1) which OS you are on, and (2) (in full detail) what
you tried and what happened.
Best regards,
Tony.
--
Between 1950 and 1952, a bored weatherman, stationed north of Hudson
Bay, left a monument that neither government nor time can eradicate.
Using a bulldozer abandoned by the Air Force, he spent two years and
great effort pushing boulders into a single word.
It can be seen from 10,000 feet, silhouetted against the snow.
Government officials exchanged memos full of circumlocutions (no Latin
equivalent exists) but failed to word an appropriation bill for the
destruction of this cairn, that wouldn't alert the press and embarrass
both Parliament and Party.
It stands today, a monument to human spirit. If life exists on other
planets, this may be the first message received from us.
-- The Realist, November, 1964.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php