From ae3a8664b3c532e7f17de64b6a049235afe4e0d7 Mon Sep 17 00:00:00 2001 From: Mao-Yining Date: Sat, 4 Oct 2025 10:22:07 +0000 Subject: [PATCH] runtime(doc): Add explanation for Vim's IME related: #10513 Signed-off-by: Mao-Yining Signed-off-by: Christian Brabandt --- runtime/doc/mbyte.txt | 32 +++++++++++++++++++++++++++++++- runtime/doc/tags | 1 + 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index fa050b9ba0..d41b0d2aa2 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -1,4 +1,4 @@ -*mbyte.txt* For Vim version 9.1. Last change: 2025 Aug 10 +*mbyte.txt* For Vim version 9.1. Last change: 2025 Oct 04 VIM REFERENCE MANUAL by Bram Moolenaar et al. @@ -971,6 +971,36 @@ of Windows you use. For example, on my Windows 2000 box: The default is still English (United Stated) +MS-Windows IME Compatibility *multibyte-ime-compatibility* + +Vim manages input methods on Windows systems via the `imm32.dll` (Input Method +Manager). The implementation, dating back to the Windows 2000 era, may not be +fully compatible with modern input methods. Modern input method processing +has shifted to the Text Services Framework (TSF), whose behavior may not fully +align with the traditional IME interface. For details about IME and TSF, +refer to the Microsoft documentation website (link is omitted since MS +documentation URLs often change). + +In some cases Vim might incorrectly enable the Input Method (IM) in Normal +mode upon startup when the Windows display language is set to a CJK language. +To work around this issue, try adding the following configuration to your +|gvimrc| file: > + + autocmd VimEnter * set imdisable | set noimdisable +< +If you make any progress in diagnosing or resolving these issues, feedback is +welcome. + +Note: IME behavior can vary due to differences in implementations by different +vendors. If you encounter issues with a specific input method, it is +recommended to test with an alternative one. + +For proper integration with Vim's |+multi_byte_ime| system, changes in the +input method's status must be detectable by the `ImmGetOpenStatus()` function +in Vims source code. Currently, some input methods that support multi-language +input may have internal state changes that gVim cannot capture. + + Cursor color when IME or XIM is on *CursorIM* There is a little cute feature for IME. Cursor can indicate status of IME by changing its color. Usually status of IME was indicated by little icon diff --git a/runtime/doc/tags b/runtime/doc/tags index cb14b75fdc..25955c72fe 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -9097,6 +9097,7 @@ multi-lang mlang.txt /*multi-lang* multi-repeat repeat.txt /*multi-repeat* multibyte mbyte.txt /*multibyte* multibyte-ime mbyte.txt /*multibyte-ime* +multibyte-ime-compatibility mbyte.txt /*multibyte-ime-compatibility* multibyte-input mbyte.txt /*multibyte-input* multilang mlang.txt /*multilang* multilang-menus mlang.txt /*multilang-menus*